Advantage TDataSet Descendant
Retrieves key data for the given index order for the current record.
function AdsExtractKey : String;
AdsExtractKey returns the string data, and if the key is not of character type it is up to the user to convert the data to a usable state. It is important to note that the key generated by this function is built on the client, and the key may not exist in the index. The data from AdsExtractKey can be used directly in a subsequent call to AdsSeek, AdsSeekLast, or AdsSetScope.
AdsTable1.Exclusive := TRUE;
AdsTable1.Active := TRUE;
AdsTable1.AdsCreateIndex( '', 'Tag1', 'LastName', '', '', [] );
AdsTable1.IndexName := 'Tag1';
AdsTable1.FindNearest( ['C'] );
strKeyValue := AdsTable1.AdsExtractKey;
{ strKeyValue equals Carlson }