Function DbCreate() Foundation
Generates a database file from a file structure array.
DbCreate( <cDbfFile>, <aStructure>, [<cDBE|<oSession>] ) --> NIL
Element No. | Description | Constant in Dbstruct.ch |
---|---|---|
1 | Field name | DBS_NAME |
2 | Field type | DBS_TYPE |
3 | Field length | DBS_LEN |
4 | Decimal places | DBS_DEC |
The return value of DbCreate() is always NIL.
The database function DbCreate() creates an empty database file from the two dimensional array <aStructure> containing the field specifications for each field in the file. Each subarray contains four elements which specify the field name, field type, field length and number of decimal places. The number of decimals must always be specified and should be set to zero for all field types except numeric. The length of character fields depends on the database engine (DBE) being used. For compatibility reasons the DBFDBE supports character fields only up to 64KB in length.
A new database file can also be created using the commands CREATE and CREATE FROM which use a DBF file containing the field definitions.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.