BUG: Table Loses Order When Used Again

Last reviewed: June 28, 1995
Article ID: Q114278
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.6, 2.6a
  • Microsoft FoxPro for MS-DOS, versions 2.6, 2.6a

SYMPTOMS

When a table is used again, the first instance of the table loses its order.

RESOLUTION

This problem occurs when an .IDX file is used to store the index. This problem does not occur when a .CDX file is used to store the index. The problem can therefore be avoided by storing index expressions in a .CDX file rather than in an .IDX file.

STATUS

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

MORE INFORMATION

This behavior differs from that of dBASE IV. In dBASE IV, the original table will retain its order when another copy of that table is used again.

Steps to Reproduce Problem

The following code sample demonstrates this situation:

   * Create a table with

   CREATE TABLE test (myfld C(2))
   INSERT INTO test (myfld) VALUES ("BB")
   INSERT INTO test (myfld) VALUES ("AA")
   INDEX ON myfld TO test.idx

   CLOSE ALL
   SET EXCLUSIVE OFF

   USE test ALIAS one INDEX test IN 1
   SELECT one
   ? "1: "+ORDER()    && Display ORDER() before USE..AGAIN
   USE test AGAIN ALIAS two INDEX test IN 2
   SELECT one
   ? "2: "+ORDER()    && Display ORDER() after USE..AGAIN

When the above code is executed in dBASE IV, the ORDER() function will indicate that the first instance of "test" retains its order when that table is used again. However, when this code is executed in FoxPro, the ORDER() function will indicate that the first instance of "test" does not retain its order when that table is used again.

NOTE: To run this code in dBASE IV, you must remove the CREATE TABLE and INSERT INTO code. You must also create a table and indices at the dot prompt before executing the code.


Additional reference words: FoxDos FoxWin 2.60 2.60a buglist2.60
buglist2.60a differences
KBCategory: kb3rdparty kbprg kbprb kbbuglist
KBSubcategory: FxinteropDbase


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 28, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.