PRB: Records Appear in Record Number Order After Indexing

Last reviewed: June 27, 1995
Article 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.

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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.