Click or drag to resize

DbServer.DBStruct Property

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.7
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_NAMEcName
DBS_TYPEcType
DBS_LENnLength
DBS_DECnDecimals
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()
4  LOCAL aStruct AS ARRAY, oDBSales AS DBServer
5  oDBSales := Sales{}
6  aStruct := oDBSales:DBStruct
7  AEval(aStruct, {|aField|QOut(aField[DBS_NAME])})
See Also