RAD Studio |  |

Executing a Search with Find Methods
See Also
Collapse All

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

Executing a Search with Goto Methods

Specifying the Current Record After a Successful Search

Searching on Partial Keys

Searching on Partial Keys

FindKey

FindKey

FindNearest

FindNearest

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!