AdsLookupKey

Advantage Client Engine

Performs an indexed search on the given table using the given index order to determine if a key exists in the index. Scopes and filters are ignored.

Syntax

UNSIGNED32

AdsLookupKey (ADSHANDLE hIndex,

UNSIGNED8 *pucKey,

UNSIGNED16 usKeyLen,

UNSIGNED16 usDataType,

UNSIGNED16 *pbFound);

Parameters

hIndex (I)

Handle of index order.

pucKey (I)

Search key (not necessarily a null terminated string).

usKeyLen (I)

Length of search key.

usDataType (I)

Indicates type of data given in pucKey. ADS_RAWKEY indicates the key is given exactly as needed for the lookup. No conversion is performed. ADS_STRINGKEY indicates the data is in a character string (numeric date, and ANSI/OEM conversions performed as necessary. ADS_DOUBLEKEY indicates that the data is a pointer to an 8-byte floating-point value.

pbFound (O)

Return True if the key found.

Remarks

AdsLookupKey determines if a key exists in the index order. It does not perform any record movement. This function may be used to determine if a key value can be added to a unique index. See AdsCreateIndex for information about unique indexes.

Example

Click Here

See Also

AdsCreateIndex

AdsSeek

AdsInitRawKey

AdsBuildRawKey