Advantage Client Engine
Retrieves the current record number
UNSIGNED32 |
AdsGetRecordNum (ADSHANDLE hTable, UNSIGNED16 usFilterOption, UNSIGNED32 *pulRec); |
hTable (I) |
Handle of table or cursor. |
usFilterOption (I) |
Indicates if filters are to be respected (if they are set). Options are ADS_RESPECTFILTERS and ADS_IGNOREFILTERS. |
pulRec (O) |
Returns the current record number. |
AE_NO_CURRENT_RECORD |
Data cannot be retrieved from EOF or BOF |
Each physical record in a table has a record number. The first physical record is number 1. All records, even deleted ones (in DBF tables), have record numbers. The only way to change record numbers in a table is to perform an AdsPackTable.
If ADS_IGNOREFILTERS is set, this function returns the current physical record. When ADS_RESPECTFILTERS is indicated, the function performs a GotoTop on the table and counts until it reaches the current record.
See AdsGetKeyNum to retrieve logical record numbers based on index orders.
Note When used with ADS_RESPECTFILTERS, this function may skip through every record in a table, and could be extremely slow. It is not recommended to use this function with ADS_RESPECTFILTERS except on very small tables.