DbServer.DBStruct Property (Typed) | |
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.21
Syntax VIRTUAL PROPERTY DBStruct AS ARRAY GET
public override Array DBStruct { get; }
Request Example
View SourceProperty Value
Type:
ArrayAn 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:
Constant | Description |
---|
DBS_NAME | Returns the name of the field. |
DBS_TYPE | Returns the data type of the field. |
DBS_LEN | Returns the length of the field. |
DBS_DEC | Returns the number of decimal places for the field. |
DBS_ALIAS | cAlias |
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():
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