Progress
DataServer for
Microsoft SQL Server
Guide
FIND Statements
The DataServer fully supports the FIND FIRST, CURRENT, LAST, PREV, and NEXT statements for MSS data source tables that have unique indexes. If a table has no unique index, only the FIND FIRST and FIND NEXT statements are available for that table. The following section provides additional information about specific FIND statements.
FIND PREV and FIND LAST Statements
Progress applications that use the FIND PREV or FIND LAST statements work on tables in a manner consistent with Progress. The only exception occurs when the FIND PREV or FIND LAST statement fails. In Progress, the cursor is located after the last record that was scanned. In the MSS data source, the cursor behaves as if the failed FIND had never occurred. To support these statements, a table must include support for the Progress ROWID function (through either a PROGRESS_RECID column or an indexed NUMBER column with unique values). See the "ROWID Function" section for more information.
For example, the procedure find.p accesses Progress and SQL Server™ databases using the same FIND and FIND PREV statements in each case:
When you run
find.p
with a Progress table and an MSS table, you get these results (assuming that the database has records for customer numbers 1 through 4):
![]()
If the FIND PREV statement fails, the cursor remains located after customer.cust-num 3 in the Progress table, which was the last record scanned. In the data source table, the cursor is positioned at cust-num 2. Failed finds do not affect cursor position in data source tables.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |