Click or drag to resize

DbServer.DBStruct Property (Typed)

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:  XSharp.VO.SDK
Assembly:  XSharp.VORDDClasses (in XSharp.VORDDClasses.dll) Version: 2.19
Syntax
 VIRTUAL PROPERTY DBStruct AS ARRAY GET 
Request Example View Source

Property Value

Type: Array
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_NAMEName (string)
DBS_TYPEType (string)
DBS_LENLength (number)
DBS_DECDecimals (number)
DBS_ALIASAlias (string)
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