By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,940 Members | 611 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,940 IT Pros & Developers. It's quick & easy.

Trouble with importing Visual FoxPro 2.1 .dbf files into Access 2003

P: 2
Hello,

Iíve been given the task of importing .dbf files from a very old version of Visual FoxPro (version 2.1) into Access (2003). When I import the data straight to Access it errors with:

External table is not in the expected format. (Error 3274)

Iíve tried the following but it did not work:
ďTo import data from a FoxPro database, use the Microsoft Visual FoxPro ODBC driver. To do so, follow these steps:
1. Click Start, and then click Control Panel.
2. In Control Panel, double-click Administrative Tools.
3. In the Administrative Tools window, double-click Data Sources (ODBC), and then add a new ODBC data source for your FoxPro database or tables by selecting the appropriate Visual FoxPro driver.
4. Start Access, and then open your Access database.
5. On the File menu, point to Get External Data, and then click Import.
6. In the Import dialog box, click ODBC Databases in the Files of type list.
7. In the Select Data Source dialog box, click the Visual FoxPro data source that you created in step 3, and then click OK.
8. In the Import Objects dialog box, click the tables that you want to import, and then click OK. ď

If I open the file with excel or as text it begins with .dbc then begins the data stream on one line. Does anyone know of a way to import these files into Access? Any help would be very much appreciated.
Jan 6 '09 #1
Share this Question
Share on Google+
3 Replies


Expert Mod 2.5K+
P: 2,545
Hi. It would help us greatly if you could let us know in which way your ODBC attempt did not work. Were you unable to set up an ODBC connection, or what?

Using the FoxPro ODBC driver is the right way to go, as it will allow you to access the tables within the FoxPro database via one of Microsoft's own drivers. It will also allow you to access the tables within the FoxPro DB from any ODBC-compliant application, including Excel.

Attempting to open the file as text or via Excel (without using the ODBC driver) simply will not work. Like Access itself and any other proprietary database the file structure is not amenable to interpretation as text or to being opened as some form of simple byte stream - any more than you can open any other structured binary file as if it were a byte stream.

If you still had a working FoxPro installation you could always use its facilities to export the data into some intermediate format that Access can import directly - either as text files, CSVs or even DBase DBFs or similar if these choices are available. If you do not have FoxPro any more the ODBC route is the only workable one I can think of - and the built-in drivers are intended for just such a purpose.

-Stewart
Jan 6 '09 #2

Expert Mod 2.5K+
P: 2,545
For your reference, here is a link to a web page which specifies the file structure of a FoxPro DB. I would hesitate even to start considering deconstructing such a file, but if you are feeling very brave perhaps this is for you...

http://msdn.microsoft.com/en-us/libr...86(VS.71).aspx

If you find setting up an ODBC link daunting then the prospect of delving into the file structure at such a low level is surely much worse!

-Stewart
Jan 6 '09 #3

P: 2
I was able to find a work around. Thanks for the reply.
Jan 7 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.