PRB: IDX with the Same Name as the Table Won't Open

Last reviewed: June 27, 1995
Article ID: Q129536
The information in this article applies to:
  • Microsoft FoxPro for Windows, version 2.6a

SYMPTOMS

You are unable to open a table that has an IDX with a name identical to the table name.

CAUSE

If a CDX exists that has the same name as its table, the table cannot be opened with an IDX that also has the same name.

For example, if you have a table named TEST.DBF, and indexes named TEST.CDX and TEST.IDX, you will not be able to open the table.

RESOLUTION

Sometimes programs written in previous versions of FoxPro or in FoxBASE+ use IDX files instead of CDX files. These programs are likely to contain the following code:

   USE customer INDEX customer

This code will open the customer database with the CUSTOMER.IDX if CUSTOMER.CDX does not exist. If a CDX is created, subsequent execution of this command will open customer, but no order will be set and no error will displayed. Deleting the CUSTOMER.CDX will allow the program to function as it previously did.

NOTE: The first time a table is opened after a CDX has been deleted the following message is displayed:

   "Structural CDX file not found"

Choose the Ignore button to continue.

STATUS

This behavior is by design.


Additional reference words: FoxWin 2.60a
KBCategory: kbprg kbprb
KBSubcategory: FxprgTable


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.