QMSelectLeft(), QMSelectRight() |
![]() ![]() ![]() |
The QMSelectLeft() and QMSelectRight() functions traverse an alternate key index, creating a select list from the entry to the left or right of the last entry processed.
Format
where
The QMSelectLeft() and QMSelectRight() functions construct a select list from the alternate key index entry to the left or right of the one most recently returned by QMSelectIndex(), QMSelectLeft() or QMSelectRight(). The position of the scan can be set at the extreme left using QMSetLeft() or at the extreme right using QMSetRight().
These operations allow a program to find a specific value and then walk through successive values in the sorted data structure that makes up an alternate key index.
If QMSelectIndex() is used to locate a value that does not exist in the index, QMSelectLeft() will return a list of records for the value immediately before the non-existant one and QMSelectRight() will return a list of records for the value immediately after the non-existant one.
The QMStatus() function returns zero if the operation is successful, non-zero if it fails because the index does not exist. |