Click or drag to resize

DbServer.DBStruct Property

X#
An array containing the structure of this data server, whose length (that is, number of elements) is equal to the number of fields in the server.

Namespace:  VO
Assembly:  VORDDClasses (in VORDDClasses.dll) Version: 2.21
Syntax
 VIRTUAL PROPERTY DBStruct AS USUAL GET 
Request Example View Source

Property Value

Type: Usual
An array containing the structure of this data server, whose length (that is, number of elements) is equal to the number of fields in the server.
Remarks
An array containing the structure of this data server, whose length (that is, number of elements) is equal to the number of fields in the server. Each sub-array is comprised of five elements, which contain the following information, in this order:
ConstantDescription
DBS_NAMEReturns the name of the field.
DBS_TYPEReturns the data type of the field.
DBS_LENReturns the length of the field.
DBS_DECReturns the number of decimal places for the field.
DBS_ALIAScAlias
Examples
This example opens a database file, then creates an array containing the database structure using DBServer:DBStruct within an aliased expression. The field names are then listed using AEval():
X#
1CLASS Sales INHERIT DBServer
2...
3FUNCTION StructDemo()
4LOCAL aStruct AS ARRAY, oDBSales AS DBServer
5oDBSales := Sales{}
6aStruct := oDBSales:DBStruct
7AEval(aStruct, {|aField|QOut(aField[DBS_NAME])})
See Also