Top  Previous  Next


The QMSelectIndex() function generates a select list from an alternate key index.


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.


IndexValueis the value to be located in the alternate key index.


ListNois the select list number (0 to 10).



The QMSelectIndex function constructs a list of record ids from an entry in an alternate key index. This list can subsequently be processed using the QMReadNext() function. Select list 0, the default select list, is used automatically by many QM components to control their action and should, therefore, be used with caution. An unwanted or partially processed select list can be cleared using the QMClearSelect function.


The number of items in the select list can be established by using QMGetVar() to retrieve the @SELECTED variable immediately after the QMSelectIndex().


See the QMReadList() function for a discussion on different ways to process the select list.


The example program fragments below build select list 1 from an index and use it to process records from the file open as fClients.







hmtoggle_plus1QMBasic Class Module