TurboDB VCL Component Library



Previous  Top  Next

Searches a specified record and makes that record the active record.

Delphi syntax:

function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean;

C++ syntax:

virtual bool __fastcall Locate(const AnsiString KeyFields, const System::Variant &KeyValues, TLocateOptions Options);


Searches for a record in the dataset, where the fields identified by the semicolon-delimited string KeyFields have the values specified by the Variant or Variant array KeyValues. Options indicates whether the search is case insensitive and whether partial matches are supported. Locate returns True if a record is found that matches the specified criteria and the cursor repositioned to that record.