473,231 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

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

Hello,

Ive 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)

Ive 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 5119
Stewart Ross
2,545 Expert Mod 2GB
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 Expert Mod 2GB
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
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
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
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
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
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
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
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
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
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
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
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...

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.