IBX.IBCustomDataSet.TIBCustomDataSet.LocateNext

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

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

Properties

Type Visibility Source Unit Parent
function public
IBX.IBCustomDataSet.pas
IBX.IBCustomDataSet.hpp
IBX.IBCustomDataSet TIBCustomDataSet

Description

Searches the dataset for the record after a specified record and makes that record the current record.

Call LocateNext to search a dataset for a record after the current cursor position

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.

The Options parameter is a set that optionally specifies additional search latitude when searching on string fields. If Options contains the loCaseInsensitive setting, then LocateNext ignores case when matching fields. If Options contains the loPartialKey setting, then LocateNext 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.

LocateNext returns true if it finds a matching record, and makes that record the current one. Otherwise LocateNext returns false.

LocateNext 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, LocateNext uses the index. Otherwise LocateNext creates a filter for the search.