Locate

This is an old revision of Locate, edited by BigChimp at . The current revision is 86078.

Created page with "{{Translate}} Unit: FreePascal, unit '''db''' <syntaxhighlight> function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; ov..."

Template:Translate

Unit: FreePascal, unit db

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

Official documentation: none

locate looks for a record in the dataset where the specified search values for the specified fields match. If found, the function returns true and the cursor position/current record moves to that record.

KeyFields can be a single field name or a semicolon-separated list of fields.

KeyValue can be a variant or a variant array and the number of items must match the number of fields specified in KeyFields.

Search options can be

Locate is only implemented in non-unidirectional datasets, i.e. you must be able to move back and forwards through the dataset.

See also