Show: Delphi C++
Display Preferences


From RAD Studio API Documentation
Jump to: navigation, search


function FindKey(const KeyValues: array of const): Boolean; virtual;


virtual bool __fastcall FindKey(const System::TVarRec *KeyValues, const int KeyValues_High);


Type Visibility Source Unit Parent
function public
Datasnap.DBClient TCustomClientDataSet


Searches for a record containing specified field values.

Call FindKey to search for a specific record in a dataset. KeyValues contains a comma-delimited array of field values, called a key. Each value in the key can be a literal, a variable, nil (Delphi), or NULL (C++). If the number of values passed in KeyValues is less than the number of columns in the index used for the search, the missing values are assumed to be NULL. For C++, KeyValues_Size indicates the index of the last value in the KeyValues array. This is one less than the number of key values.

If a search is successful, FindKey positions the cursor on the matching record and returns True. Otherwise the cursor is not moved, and FindKey returns False.

See Also

Code Examples

Personal tools
In Other Languages
Previous Versions