Function DbCreateFrom() Foundation
Creates and opens a new file from a structure extended file.
DbCreateFrom( <cNewFilename>, ; [<cNewDbeName>], ; <cStructFile>, ; [<cStructDbeName>], ; [<lNewArea>], ; [<cAlias>] ) --> NIL
The return value of DbCreateFrom() is always NIL.
The database function DbCreateFrom() reads the field definitions for the new file from the structure extended file <cStructFile> and creates a new database named <cNewFilename> from it. The created file is opened after the operation is completed. If the value .T. (true) is specified for <lNewArea>, the file is opened in a free work area.
A structure extended file has at least four fields. Each record contains information about a field. The following table lists the fields which must be included in a structure extended file:
|Field name||Field type||Field length||Decimal places|
If additional fields are present in the structure extended file, they are ignored by DbCreateFrom().
Contrary to dBase or CA Clipper the length of the field FIELD_LEN is not 3 but 5. The length of a character field with more than 999 characters can be entered directly and no longer needs to be encoded using the decimal places FIELD_DEC.
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.