Progress
Portability Guide


Using the FIND and GET Statements

The FIND statement retrieves an individual record and is the basis for the triggers associated with the navigation buttons. With FIND, you provide enough information for your procedure to access the database and find the record that satisfies your criteria. FIND returns a record from the database. In other words, FIND copies a record from a database to a record buffer.

Similar to the FIND statement, the GET statement returns a record from the database. However, the GET statement returns a record from the database by way of a defined query. With a defined query, the DEFINE QUERY and OPEN QUERY statements provide enough information for Progress to build a result list of all the records that match your criteria. The GET statement works with the result list to determine the correct record and then copies that record from the database to a record buffer.

A defined query lets you build a result list of records that satisfy some criteria. When you use a defined query, Progress knows about all the records that satisfy the criteria. Conversely, when you use FIND, Progress only knows about a single record that satisfies your criteria.

Unlike the FIND statement, the GET statement does not return records in a predictable order by default. The FIND statement uses the primary index of the database table. The defined query might use any index or combination of indexes to order the records in the retrieval process. If you require a definite order, do not rely on the query default. Instead, use the record phrase options to specify an order or use the FIND statement.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095