Microsoft KB Archive/119280

{| = PRB: Records Appear in Record Number Order After Indexing =
 * width="100%"|

ID: Q119280

The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5x, 2.6
 * Microsoft FoxPro for MS-DOS, versions 2.0, 2.5x, 2.6
 * Microsoft FoxPro for Macintosh, versions 2.5b, 2.5c

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.