Search code examples
foxpro

Do I need .fpt and .cdx files to extract data from Foxpro or does the .dbf file contain all the data


I need to transfer a lot of foxpro files over the internet and then import the data into an access database. In some cases the .fpt file is several times bigger than the .dbf file of the same name. From what I have been reading it seems that the .dbf file might hold everything and that I can ignore the .cdx and .fpt files. is this correct


Solution

  • CDX is a compound index file. From FoxPro help:

    If a table's structural compound index file cannot be located or is deleted or renamed, a dialog box appears when you try to open the table. If you choose the default Cancel push button, the table isn't opened. Choosing Ignore opens the table and removes the flag in the table's header that indicates an associated structural compound index file is present.

    Tip To reassociate a structural compound index that has become dissociated from its table, issue the following command: USE TableName INDEX CDXFileName

    If you try to USE a table from FoxPro without the CDX file being present you will receive a Structural CDX file not found dialog with Ignore and Cancel buttons.

    The .fpt file contains the data from Memo type fields. If the dbf has a field of type Memo and the .fpt file is missing, FoxPro will not be able to open the dbf. FoxPro will display a message box saying that the memo file is missing or invalid.

    From my testing with Access, it didn't seem to affect importing data with the CDX file missing but I couldn't import data without the FPT file.