Advantage Client Engine
Enables or disables reading of all columns in live cursors resulting from SQL SELECT statements.
UNSIGNED32 AdsStmtReadAllColumns( ADSHANDLE hStatement,
UNSIGNED16 usReadColumns );
hStatement (I) |
Handle of an SQL statement created by a call to AdsCreateSQLStatement. |
usReadColumns (I) |
Select field read setting. Valid options are ADS_READ_ALL_COLUMNS and ADS_READ_SELECT_COLUMNS. |
The default value for newly created statement handles is ADS_READ_SELECT_COLUMNS.
When a live cursor is generated from an SQL SELECT statement, the default behavior (ADS_READ_SELECT_COLUMNS) is for the server to return only the data for columns specified in the SELECT statement to the client. This can be very beneficial especially on low bandwidth networks. If the value ADS_READ_ALL_COLUMNS is specified, subsequent cursors generated from SELECT statements will have all data for all columns returned to the client.
When records in the table are locked (presumably for an edit operation), the entire record is sent from the server to the client so that the update operation can maintain the consistency of all indexes.
This setting only applies to live cursors produced by the Advantage Database Server (client/server). This setting does not apply to Advantage Local Server; there is no efficiency gain because the processing is all performed at the client. Also note that static cursors generated from SELECT statements have only the selected column data in the table by definition, so this setting does not apply to static cursors.