QMSetLeft() and QMSetRight()

QMSetLeft(), QMSetRight()

Top  Previous  Next


The QMSetLeft() and QMSetRight() functions set the scanning position of an alternate key index at the extreme left or right of the data. They are analogous to the QMBasic SETLEFT and SETRIGHT statements.


The function arguments are:


FileNois the file number returned by a previous QMOpen() call.


IndexNameis the name of the alternate key index to be used.



The QMSetLeft and QMSetRight functions are used with QMSelectLeft() and QMSelectRight() to set the scan position to the first or last entry in an alternate key index.


The QMStatus() function returns zero if the operation is successful, non-zero if it fails because the index does not exist.

The example program fragments below use QMSetLeft() to set the scan position for an index on the CODE field to the leftmost item and walk through successive entries, processing each record.







hmtoggle_plus1QMBasic Class Module