Database Engines:ads

ADSDBE and DbInfo() Professional

The Xbase++ functions DbInfo() can be used to obtain information about a workarea provided a table is open. When a table is opened with the ADSDBE, information specific to this table can be retrieved by passing #define constants listed in ADSDBE.CH to DbInfo().

Constants for DbInfo() with the ADSDBE
Constant *) Value Data type Description
ADSDBO_MEMOBLOCKSIZE ro numeric N Size of one block of a
memo field
ADSDBO_LOCALFILTER ro .T.|.F. L Indicates if a filter expression
is evaluated locally (.T.)
or by the ADS (.F.)
ADSDBO_TABLE_HANDLE ro numeric N ADS server handle of table
ADSDBO_REFRESHRECORD rw .T.|.F. L reload record with each navigation
ADSDBO_READAHEAD rw numeric N # of records to be preloaded
ADSDBO_DELETEOBJECT rw .T.|.F. L Delete dictionary object on disk
  1. ro=READONLY, rw=READ/WRITEABLE

Constants for OrdInfo() with the ADSDBE
Constant *) Value Data type Description
ADSORD_INDEX_HANDLE ro numeric N ADS server handle of index
  1. ro=READONLY

ADSDBO_LOCALFILTER

If a filter expression is active in a workarea that cannot be evaluated by the Advantage Database Server, it will be evaluated locally on the client machine by the ADSDBE. This situation can be queried by passing ADSDBO_LOCALFILTER to DbInfo().

ADSDBO_TABLE_HANDLE

Using the constant ADSDBO_TABLE_HANDLE with DbInfo() returns the ACE32 API handle of the current workarea. The handle returned can be used in calls to the ACE32 Client Engine API. The handle returned is corresponding to the following API declarations ADSHANDLE hTable and ADSHANDLE hObj.

ADSORD_INDEX_HANDLE

Using the constant ADSORD_INDEX_HANDLE with OrdInfo() returns the ACE32 API handle of the leading order in the current workarea. The handle returned can be used in calls to the ACE32 Client Engine API. The handle returned is corresponding to the following API declaration ADSHANDLE hIndex.

ADSDBO_REFRESHRECORD

By default the ADSDBE loads each record explicit from the ADS Server when navigation is performed. This ensures highest level of data integrity and conforms with the behaviour of other Xbase++ DatabaseEngines. In situations where data integrity is of lower priority, such as it is the case when running queries, setting ADSDBO_REFRESHRECORD to .F. can increase performance and reduce network traffic. An explicit reload of the current record can be achieved via a DbSkip(0) or SKIP 0 operation.

ADSDBO_READAHEAD

Using the ADSDBO_READAHEAD constant, one can define the number of records to read ahead into client cache on skip operations. The default value is 1, effectively disabling read ahead cashing but ensuring highest data integrity between client and server. To increase performance in skip operations, ADSDBO_READAHEAD should be set to a value larger than 1. The optimium amount of records to be read ahead can be calculated by dividing the network packet size by the record size. The resulting number reflects the amount of records which can be transfered to the client with a single request/reply packet transfer between client and server. Setting ADSDBO_READAHEAD to a value larger than 1 automatically sets ADSDBO_REFRESHRECORD to .F., setting ADSDBO_READAHEAD to 1 implicit sets ADSDBO_REFRESHRECORD to .T.. A DbSkip(0) or SKIP 0 operation purges the clients read ahead cache and forces a reload of the current record.

ADSDBO_DELETEOBJECT

The constant ADSDBO_DELETEOBJECT inherits its setting from the constant ADSDBE_DELETEOBJECT. The default value is .F.. For a complete explanation see Configuration of the ADSDBE

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.