Show: Delphi C++
Display Preferences

Executing a Search with Find Methods

From RAD Studio
Jump to: navigation, search

Go Up to Using Indexes to Search for Records


The Find methods do the same thing as the Goto methods, except that you do not need to explicitly put the dataset in dsSetKey state to specify the key field values on which to search.

To execute a search using Find methods:

  1. Specify the index to use for the search. This is the same index that sorts the records in the dataset. To specify the index, use the IndexName or IndexFieldNames property.
  2. Open the dataset.
  3. Search for and move to the first or nearest record with FindKey or FindNearest. Both methods take a single parameter, a comma-delimited list of field values, where each value corresponds to an indexed column in the underlying table.
Note: FindNearest can only be used for string fields.

See Also

Personal tools
In other languages
Previous Versions
Assistance