Icon Locate Method

virtual bool __fastcall Locate(const System::UnicodeString
      KeyFields, const System::Variant &KeyValues,
      Data::Db::TLocateOptions Options)

Usage

Use the Locate method to search for a specified record and makes that record the current record. KeyFields is a string containing a semicolon-delimited list of field names on which to search. KeyValues is a variant that specifies the values to match in the key fields. If KeyFields lists a single field, KeyValues specifies the value for that field on the desired record. To specify multiple search values, pass a variant array as KeyValues, or construct a variant array on the fly using the VarArrayOf routine. Options is a set that optionally specifies additional search latitude when searching on string fields. If Options contains the loCaseInsensitive setting, then Locate ignores case when matching fields. If Options contains the loPartialKey setting, then Locate allows partial-string matching on strings in KeyValues. If Options is an empty set, or if KeyFields does not include any string fields, Options is ignored.

Locate returns True if it finds a matching record, and makes that record the current record. Otherwise Locate returns False. Locate uses the fastest possible method to locate matching records. If the search fields in KeyFields are indexed and the index is compatible with the specified search options, Locate uses the index. Otherwise Locate creates a filter for the search.

Information This method is only used in the context of the descendant TDBISAMTable and TDBISAMQuery components.
Image