473,480 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

2 New Member
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
3 5145
Stewart Ross
2,545 Recognized Expert Moderator Specialist
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
Stewart Ross
2,545 Recognized Expert Moderator Specialist
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
HistoricVFP
2 New Member
I was able to find a work around. Thanks for the reply.
Jan 7 '09 #4

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

Similar topics

63
5817
by: Jerome | last post by:
Hi, I'm a bit confused ... when would I rather write an database application using MS Access and Visual Basic and when (and why) would I rather write it using Visual Studio .Net? Is it as easy...
2
1487
by: someone | last post by:
the full version of access 2003 cost about $250, whereas the full version of vfp8 cost about $500+. database newbie here, and rather confused.
1
2814
by: sanrock | last post by:
I am trying to import a dbf file created using visual fox pro and it says 'External table is not in the expected format' What might be the reason for not able to import. Is it something to do with...
1
4448
by: JoeBobHankey | last post by:
Background: - I'm running MSDE 2000 (not client tools, stored procedure capability, etc). This may change, but not in the first part of development. - My Access file is an Access 2002 project...
1
3920
by: GPBSOFT | last post by:
I am Italian developer, escuse me for my bad English I have a problem with ODBC. I must link to a database from Visual FoxPro, I have installed Windows XP Professional with service pack 2. When I...
3
9844
by: Amar | last post by:
I have a abc.PRG file in visual foxpro 8.0. I can run this file using visual foxpro environment and it creates a table X.dbf in the same folder where this program file is and populates some data in...
9
3296
by: cj | last post by:
I'm trying to forge ahead with Visual Basic .Net but recently I've suffered several major set backs in demonstrating VB is the future and we should move from Visual FoxPro. I really need to find...
1
2424
by: Philip Leduc | last post by:
Hi there, I am a MS Access VBA programmer trying to get my feet wet using VB.net / SQL server. I have SLQ 2000/visual studio 2003 loaded and did get a SQL2005/visual studio 2005 software...
6
11572
by: JimmyKoolPantz | last post by:
I have been given the task of converting a program from VFP (visual foxpro) to Visual Basic.net. My question is "Is it possible to generate a DBF file Dynamically(at runtime) using Visual...
0
6904
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7037
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7080
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6735
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4770
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
2992
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2977
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1296
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
176
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.