TAdsTable/TAdsQuery.AdsGetRelKeyPos

Advantage TDataSet Descendant

Returns the relative position of the current record in given index order.

Syntax

function AdsGetRelKeyPos : Double;

Description

AdsGetRelKeyPos returns an estimation of the position in the current key in the indicated index order. The value returned will be between 0.0 and 1.0, inclusive. If there are scopes set on the index order, the position returned will be relative to the visible records.

Example

AdsTable1.FindKey( ['Smith'] );

dPercentage := AdsTable1.AdsGetRelKeyPos;

{ dPercentage equals .785 to indicate that Smith was locaed at about 78% through the entire index }

See Also

AdsGetKeyCount

AdsGetKeyNum

AdsGetRecordNum

AdsSetRelKeyPos