?
Solved

how to import data from .dbf file to MS SQL server?

Posted on 2004-09-13
15
Medium Priority
?
551 Views
Last Modified: 2010-05-18
I have a file extended with .dbf and I want to transfer data from the file to MS SQL server 2000. Can you give me some idea how to do it? Thanks.
0
Comment
Question by:gyuan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
  • +1
15 Comments
 
LVL 13

Expert Comment

by:ispaleny
ID: 12048605
1. Run dtswiz.exe and click next
2. Select dBase IV from combo, fill file name
3. Click Next
4. Fill SQLServer logon information
5. Select database
6. And so on
0
 

Author Comment

by:gyuan
ID: 12049289
Where can I get dtswiz.exe ? Thanks.
0
 
LVL 13

Expert Comment

by:ispaleny
ID: 12049446
It is in MSSQL tools installation (Query Analyzer,...)
In Programs it is named "Import and Export Data".

Try Start - Run - type "dtswiz.exe" - click on OK
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 33

Expert Comment

by:CarlWarner
ID: 12049947
Be very careful in thinking the dBASE IV choice will work.  Depending on where that .dbf came from, it could easily be a table (.dbf) from the MS Visual FoxPro data environment that might just be different enough where a dBASE IV interface fails to load it as you would expect.  Just a note to let you know why it may not do what you want on the first try...
0
 

Author Comment

by:gyuan
ID: 12055912
I got the following error:

Error Source: Microsoft JET Database Engine
Error Description: External table is not in the expected format.
Context: Error calling OpenRowset on the provider.
0
 
LVL 33

Expert Comment

by:CarlWarner
ID: 12059625
I am convinced you just found out it isn't a dBASE IV .dbf file.

Not being an avid MS SQL Server afficionado, I'm not sure what mechanism Data Transformation Services via the dtswiz.exe uses to grab that data.  Does it use available connectivity drivers in the way of ODBC drivers?  If so, you may in fact need the MS VFP ODBC driver to get to that .dbf file.  Since that driver hasn't been part of the MDAC package for quite a while now, you'll need to d/l it and install it separately, if it is in fact what DTS needs.

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

Author Comment

by:gyuan
ID: 12126444
Thank your for your information. I visited that page. Since the file VFPODBC.DLL exists in my system, I think the ODBC driver is there. The hard thing is that I only have the database files extended with .dbf and I was told that those files are dBase files. I even do not know what the version is. I really can not find the way to retrive data from the files.
0
 
LVL 33

Accepted Solution

by:
CarlWarner earned 500 total points
ID: 12126615
If you want to actually check the version of the VFP ODBC driver or to see whether it's installed (or not) even though you see the file, go into your ODBC Data Source Administrator [under Control Panel...Administrative Tools...Data Sources (ODBC)] and go to the Drivers tab.  On mine, when I scroll down the list of installed drivers, I see "Microsoft Visual FoxPro Driver" and to the right of it is the version number that is installed.  

My VFP ODBC driver is current and showing 6.01.8629.01.  If yours doesn't, that may be the problem.
0
 

Author Comment

by:gyuan
ID: 12400730
Sorry, based on the information submitted by the users, I still can not solve the problem. Any further help will be apprreciated.
0
 

Expert Comment

by:Frylock
ID: 14355066
Export the table to a CSV.

From within Foxpro, select the table and type

"copy to filename csv"

Then from the enterprise manager, import there and select the last option under source - text file. And you should be set.
0
 
LVL 33

Expert Comment

by:CarlWarner
ID: 14355179
And if there are any memo fields involved, the CSV export will lose all of that.
0
 

Expert Comment

by:Frylock
ID: 14355315
Ok, fine. You can also create an actual database in foxpro, attach the loose table to it, and then import it using hte dtwiz. I have something like that running righ tnow.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question