PRB: Records Appear in Record Number Order After Indexing

ID: Q119280

The information in this article applies to:

SYMPTOMS

Even though an index has been created, the records still appear in record number order (the order in which the records are encountered).

CAUSE

If records appear in record number order after an index is created, it is possible that the expression used as the index key was enclosed in quotation marks when the key was generated. For example:

   INDEX ON 'state' TAG statetag

If a field used as part of an index expression is enclosed in quotation marks, that portion of the index expression is based on the literal field name instead of the field contents. Because the field name is the same for all records, the order of appearance will be record number order.

RESOLUTION

Remove the quotation marks from the index key expression and regenerate the index.

REFERENCES

For more information, see "INDEX ON" in the "Language Reference."

Additional reference words: FoxMac FoxDos FoxWin 2.00 2.50a 2.50b 2.50c 2.60 not change KBCategory: kbprg kbprb kbtshoot KBSubcategory: FxprgGeneral

Last Reviewed: June 27, 1995