BUG: "Index Internal Consistency Error" Occurs with IDX Index

Last reviewed: November 24, 1997
Article ID: Q176829
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b, 5.0, 5.0a
  • Microsoft Visual FoxPro for Macintosh, version 3.0b

SYMPTOMS

When you use an IDX index on a Visual FoxPro table, you may receive the following error while scrolling through the data in a Browse window:

   Index Internal Consistency Error.

Visual FoxPro shuts down after you click the OK button. This only seems to occur when the table is buffered.

RESOLUTION

Add the COMPACT clause to the INDEX command. For example, use the following command to create a compact index:

   INDEX ON <fieldname> TO <filename> COMPACT

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The problem occurs after an IDX index is created and used with the table. When the user browses the table and changes the data in the indexed field, moving up or down in the Browse window several times with the arrow keys, the scroll bar, or the Page Up and Page Down keys produces the error.

Steps to Reproduce Behavior

  1. Run the following code from a .prg file or the Command window in Visual FoxPro:

          USE HOME()+"samples\data\customer"
          COPY TO HOME()+"Test.dbf"
          SET MULTILOCKS ON
          USE test
    
          INDEX ON cust_id TO junk   &&  COMPACT
          =CURSORSETPROP("Buffering", 5)
          BROWSE
    
    

  2. When the Browse window appears, change the data in the cust_id field. Press the Down arrow key and move through the records to the end of the table. If necessary, press the Up arrow key and move through the records to the beginning of the table. The error should appear. Sometimes moving through the data with the Page Up and Page Down keys also causes the error.

  3. Remove the "&&"s from in front of the COMPACT clause in the code above and rerun the code to rebuild the index. The error does not occur when you scroll up and down in the Browse window after changing data in the index key field.

Keywords          : FxprgTable VFoxMac vfoxwin
Version           : MACINTOSH:3.0b; WINDOWS:3.0,3.0b,5.0,5.0a
Platform          : MACINTOSH WINDOWS
Issue type        : kbbug


================================================================================


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: November 24, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.