Datasnap.DBClient.TCustomClientDataSet.FindKey
[–] Properties | |
---|---|
Type: function | |
Visibility: public | |
Source: Datasnap.DBClient.pas Datasnap.DBClient.hpp
| |
Unit: Datasnap.DBClient | |
Parent: TCustomClientDataSet |
Delphi
function FindKey(const KeyValues: array of const): Boolean; virtual;
C++
virtual bool __fastcall FindKey(const System::TVarRec *KeyValues, const System::NativeInt KeyValues_High);
Description
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.