|DBCreateAuto -- Create a new database with integrated index|
DBCreateAuto(database-name, num-fields, fields, num-tags, tags, overwrite-flag)
|Managing Database Files|
NEW IN FILEFLEX 3.0|
DBCreateAuto creates an "automatic" or "structural" (FoxPro term) index file at the same time the data file is created. The automatic index file is opened at the same time as the data file.
Here's the format for a tag record:
Order must be 'A' for ascending or 'D' for descending. If filter-expr is "0", then no filter is applied. There can be any number of tags per index file (separated by newlines), allowing for lots of complex orderings. The new indexes allow for complex filtering operations, uniqueness, and more. Indexes created with DBCreateAuto can not be closed with DBCloseIndex.
Like DBCreate, DBCreateAuto has an overwrite flag that's "true" or "false" (true if you don't want FileFlex to overwrite a data file).
Each line of the field list container is used for a field. Each line contains the following information: name of field, type of field, length, and number of decimal places (for numeric fields).
The type of field parameter may be one of the following:
DBCreateAuto now creates a .FPT file for memos and other data rather than a .DBT file (the format used in earlier FileFlex versions). It also creates a .CDX (compound, compact index) rather than the .NDX format used in previous FileFlex versions.|
In FileFlex 3, you can create a new database using FoxPro (recommended), Access (specify FoxPro format), or programmatically, using DBCreate or DBCreateAuto.
DBCreate has been modified so it works properly with the safety functions and actually matches how the manual describes it (this was not the case in earlier versions...hey, we get better with age!) FileFlex now recognizes "true" or "t" in the safety field as an instruction to prevent overwriting the database and "false" or "f" as an instruction to allow overwriting.
put DBCreate("FRIENDS",6, field dbFields, 2, taglist, "false") into dbResult