<< Click to Display Table of Contents >> AdoServer:DBStruct Access |
![]() ![]() ![]() |
Return the structure of the table in a VO structure array
ACCESS DBStruct CLASS AdoServer
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.
This method returns the structure of the Ado table in the form of a VO structure array Each subarray is comprised of four elements, which contain the following information, in this order:
Constant Attribute
DBS_NAME cName
DBS_TYPE cType
DBS_LEN nLength
DBS_DEC nDecimals
This example opens a database file, then creates an array containing the database
structure using AdoServer:DBStruct within an aliased expression. The field names
are then listed using AEval():
CLASS Sales INHERIT AdoServer
...
FUNCTION StructDemo()
LOCAL aStruct AS ARRAY, oDBSales AS AdoServer
oDBSales := Sales
aStruct := oDBSales:DBStruct
AEval(aStruct, |aField|QOut(aField[DBS_NAME]))