[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Locate a record based on some key values
Source position: db.pas line 1322
public function TDataSet.Locate( |
const keyfields: String; |
const keyvalues: Variant; |
options: TLocateOptions |
):Boolean; virtual; |
keyfields |
|
List of fields, separated by semicolons |
keyvalues |
|
Single value or array of values. |
options |
|
Options to take into account when searching for the record. |
True if a record matching KeyValues is found.
Locate attempts to locate a record in the dataset. There are 2 possible cases when using Locate.
The matching always happens according to the Options parameter. For a description of the possible values, see TLocateOption.
If a record is found that matches the criteria, then the locate operation positions the cursor on this record, and returns True. If no record is found to match the criteria, False is returned, and the position of the cursor is unchanged.
The implementation in TDataset always returns False. It is up to TDataset descendents to implement this method and return an appropriate value.
|
Search for a record and return matching values. |
|
|
Available options when locating a record in a dataset |
lazarus-ccr.sourceforge.net |