AdoServer:DBStruct Access

<< Click to Display Table of Contents >>

Navigation:  Dataservers > AdoServer Class >

AdoServer:DBStruct Access

Previous pageReturn to chapter overviewNext page

Purpose

Return the structure of the table in a VO structure array

 

Prototype

ACCESS DBStruct CLASS AdoServer

 

 

Return

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.

 

Description

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

 

 

Example(s)

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]))

 

 

See Also

AdoServer, AdoServer:FCount