Searching for records
From InterBase
Go Up to Working with Tables
You can search for specific records in a table in various ways. The most flexible and preferred way to search for a record is to use the generic search methods Locate
and Lookup
. These methods enable you to search on any type of fields in any table, whether or not they are indexed or keyed.
- Locate finds the first row matching a specified set of criteria and moves the cursor to that row.
- Lookup returns values from the first row that matches a specified set of criteria, but does not move the cursor to that row.
You can use Locate
and Lookup
with any kind of dataset, not just TIBTable
. For a complete discussion of Locate
and Lookup
, see Understanding Datasets.