Index cursors
- Last Updated: October 18, 2024
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
To understand better how the AVM navigates through a set of data, you need to understand the concept of index cursors. When you retrieve a record from the database using any of the statements you've seen in this section, the AVM keeps track of the current record position using an index cursor—a pointer to the record, using the location in the database indexes of the key value used for retrieval.
When you execute the statement FIND FIRST Customer,
for example, the AVM sets a pointer to the record for Customer
1 within the CustNum index. If
you execute the statement FIND FIRST Customer WHERE Country
= "USA", the AVM points to Customer 1025
through the CountryPost index.
When you execute another FIND statement on the same
table using one of the directional keywords, the AVM can go off
in any direction from the current index cursor location, depending
on the nature of the statement. By default, it reverts to the primary
index. Here's an example that extends the previous one slightly:
|