TAdsTable.AdsGetKeyLength

Advantage TDataSet Descendant

Retrieves the key size in bytes of the given index order.

Syntax

function AdsGetKeyLength : Word;

Description

Returns the number of bytes in each physical key in the index file. If the index key evaluates to a variable-length expression, this function will return zero for the length.

Example

AdsTable1.Exclusive := TRUE;

AdsTable1.Active := TRUE;

AdsTable1.AdsCreateIndex( '', 'Tag1', 'LastName;DeptNum', 'Empid>50', '', [] );

AdsTable1.IndexName := 'Tag1';

 

wKeyLength := AdsTable1.AdsGetKeyLength;

{ wKeyLength equals 20 }

See Also

AdsExtractKey

AdsGetKeyType