LocateRecordOption method

Previous  Top  Next

See Also Properties Methods Events Example
Unit
MySQLDataset

Applies to
TMySQLDataset component

Declaration
type TMySQLLocateOptions = set of(loFirst, loNext, loPrior, loLast, loTextSearch, loMatchAll);

function
 LocateRecordOption(const KeyFields: stringconst KeyValues: Variant; Options: TLocateOptions; SyncCursor: Boolean; MySQLOptions: TMySQLLocateOptions; var MatchedField: TField): Boolean;

Description
Enhanced Locate. It allows for a full text search on all fields of the current result set. The KeyFields, KeyValues and Options parameter works the same as with borland's standard Locate method. If SyncCursor is True the dataset will be positioned on the first matched record. MySQLOptions determine the direction and type of search to conduct. And the MatchedField return the TField component which matched the criteria. This function returns True if a match was found.

loFirst   Calls First on the dataset before starting the search.
loNext   Use Next on the dataset to search forward
loPrior   Use Prior on the dataset to search backward
loLast   Calls Last on the dataset before starting the search.
loTextSearch   Does a text search on the fields included in the search, thus the KeyValues must contain a string.
loMatchAll   All fields of a record must contain the value(s) specified for the search in KeyValues.