SDAC

TMemDataSet.LocateEx Method

Excludes features that don't need to be included to the TMemDataSet.Locate method of TDataSet by the specified field names.

Class

TMemDataSet

Syntax

function LocateEx(const KeyFields: string; const KeyValues: variant; Options: TLocateExOptions): boolean; overload;

Parameters
KeyFields
Holds the fields to search in.
KeyValues
Holds the values of the fields to search for.
Options
Holds additional search parameters which will be used by the LocateEx method.
Return Value
True, if a matching record was found. Otherwise returns False.

Remarks

Call the LocateEx method when you need some features not to be included to the TMemDataSet.Locate method of TDataSet.

LocateEx returns True if it finds a matching record, and makes that record the current one. Otherwise LocateEx returns False.

The LocateEx function works faster when dataset is locally sorted on the KeyFields fields. Local dataset sorting can be set with the TMemDataSet.IndexFieldNames property.

Note: Please add the MemData unit to the "uses" list to use the TLocalExOption enumeration.

See Also

© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback