Function DbStruct() Foundation
Generates an array containing the structure data for a database file.
DbStruct() --> aStructure
The return value of DbStruct() is a two dimensional array containing the data for a database file structure. Each subarray contains the specification for a single field. The subarrays have four elements with the following contents:
Element No. | Meaning | Constant in Dbstruct.ch |
---|---|---|
1 | Field name | DBS_NAME |
2 | Field type | DBS_TYPE |
3 | Field length | DBS_LEN |
4 | Decimal places | DBS_DEC |
When no database file is open in the work area, an empty array ({}) is returned.
The database function DbStruct() returns the structure of a database file open in a work area. When the function is used without the alias operator, it returns the structure of the database file in the current work area. DbStruct() generates a two dimensional array with four columns containing the same information about the database file as what would be created by the command COPY STRUCTURE EXTENDED.
Passing the array returned by DbStruct() to the function DbCreate(), a new database file can be created based on the structure of an existing database file.
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.