Link to home
Start Free TrialLog in
Avatar of DanielHochman
DanielHochman

asked on

Importing Custom FoxPro 2.10f Database into Access 2003

Hi-
A friend of mine has a custom program written about 15 years ago based on Fox Pro 2.10. I assume it's 2.10 because when I start up FoxDoc (the only FoxPro program that works right now on my DOS emulator) it says "Version 2.10f". As a sidepoint when I try to open the main FoxPro file (fox.exe or foxpro.exe) the command prompt tells me "EXE and OVL file do not match".

Anyway, I need to figure out how to import the data fom this database into Access. What files am I looking for? There is no export function in the custom database, but the data has to be stored somewhere on the HD.

Would it be one file or many files (1 for each table)?

Any help would be greatly appreciated.

Thanks,
Daniel
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi DanielHochman,

The first thing to find are the .dbf files. These should be individual tables, there will also be .ntx files which are indexes for the tables though you probably won't need to worry about these. You can then create import or linked tables in access using the dBase IV odbc driver.

Tim Cottee
Avatar of DanielHochman
DanielHochman

ASKER

I found many .dbf files. When I try to import any of them into Access it tells me "Index not Found". What is dBase IV odbc driver?

Thanks,
Daniel
DanielHochman,

It is possible that you also have .mdx files which are a compound index file and would normally have the same name as the base .dbf file. When you import into access you would need to specify the location of the compound index file so that access can use this.

The dBase IV odbc driver is one of the available options when you select files to import, you usually have Excel files, csv files, dBase III, dBase IV etc and "odbc data source" as options. The best if you have it is to create an Odbc datasource using the Microsoft Visual Foxpro driver though this is not always available by default.

Tim
I was able to import some .dbf files but none I think I need. The others say "No Index Found" I was not able to find any .mdx or .ntx files - I did a complete search of the HD.
Some of the files I was able to import came up as gibrish (this might be because some of the databases were written in a foreign language (Hebrew). I don't know if you would know how to fix that. It's also possible they were imported wrong.

If you have any suggestions about the "No index found" let me know.

Thanks,
Daniel
FoxPro never used .ntx files for index files.  So, don't look for them.  And FoxPro never supported .mdx type files that have multiple tags in them.  That was a dBASE IV thing that FoxPro never had in it.  As far as index files in FoxPro, FoxPro at that stage used .idx files.  Look for any .idx files that generally, but not always, have the same file name (without extension) as the dbf files.  Also, if there are any .fpt files present that match dbf file names without the extension, pull them along.  Those are the memo files that get created when a memo field is part of the structure/scheme in FoxPro.  You shouldn't be able to open a dbf that is supposed to have a memo file if the .fpt file is missing.

And don't bother using a dBASE IV ODBC driver.  Just go ahead and use the freely download VFP ODBC driver from MS here:

Visual FoxPro ODBC Driver
http://msdn.microsoft.com/vfoxpro/downloads/updates/odbc/default.aspx

ACCESSING YOUR VFP DATABASE IN ACCESS
http://www.foxite.com/articles/032.htm
I've done a complete search for .idx and .fpt files and have come up empty. Not one on the whole HD. I have found some .cdx files with the same name as my .dbf files. Are these indexes? If so, how do I tell access that these are the indexes when importing.
Also, the FoxPro database does have memos attached. Is there another possible file type besides .ftp that these could be?

Thanks,
Daniel
Oh I did find the fpt files.- I was accidentally searching for .ftp...
ASKER CERTIFIED SOLUTION
Avatar of CarlWarner
CarlWarner
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Its simple in Visual basic. In VB you can read/write to both foxpro and access. Try reading from Foxpro and insert to access. But if you are having many files it is a lengthy process because of foxpro file is having a diffrent structures.