Solved

How to import/Export .DBF into/From SQL Server 2005?

Posted on 2007-03-28
9
5,311 Views
Last Modified: 2010-10-05
Dear DB Experts

- I have a file with .DBF format; how can I know which database is this??
Is it Microsoft database 5 or which version
Or FoxPro???

- I managed to open the file with a utility but all I get is corrupted data????
I also imported the file into SQL Server 2000 retrieved the table data and it was scrambled

- I need to import and export the same file in SQL 2005 file how can I do that??

Note: The file contains Persian Language I installed the Persian Characters on my regional settings and I am able to write these characters in any editor.


I hope my question is clear enough

Appreciate the fast response.
 
0
Comment
Question by:MOA81
[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
  • 2
9 Comments
 
LVL 24

Expert Comment

by:fridom
ID: 18807329
I'd bet on dbase format or Xbase format. It should be possible to access it via ODBC I'm sure that using dbase files as ODBC source should work.

Regards
Friedrich
0
 
LVL 8

Author Comment

by:MOA81
ID: 18807470
Dear Friedrich

As mentioned in my Question Ive been able to access the file and import SQL Server 2000

and I did that through ODBC

can you elaborate more on the point you mentioned  

can you make that out in some clear points how to export or import in 2005

and what is .DBF what kind of DB is this ?? what version ?? and why the data inside is scrambled
0
 
LVL 16

Expert Comment

by:rboyd56
ID: 18807881
As fridom indicated the file is probably a DBase file or possibly a FoxPro file. There is no way to know the version without knowing where the file came from. Unless the version is stored somewhere in the file itself and you can see it from the properties of the file in Windows Explorer.

To import the data into SQL Server 2005 you can create an SSIS package using Business Intelligence Studio or you can create a linked server in 2005 to the DBF file.

How did you import it into SQL Server 2000?

The data is bprobably scrambled because you do not have the proper collation in the database you imported it to.

I would suggest creating a new database with the proper collation and importing into that database. Look at the Create Database TSQL command for the proper syntax on creating a database with a specific collation.
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 8

Author Comment

by:MOA81
ID: 18807979
Guys


I already know its either Dbase or Foxpro I mentioned that in the question

and I already created a database with the correct collation and still scrambled

so far no help

Dear Both (so far) can you please mention the steps of the importing it should be that hard

I just want to make sure I am doing the right thing

I already have experience in SQL Server the part I am missing is how to deal with this Dbase file

0
 
LVL 24

Accepted Solution

by:
fridom earned 250 total points
ID: 18809308
you have to register the source in the data source application. You choose the dbase odbc provider. And then you can just access this database as any other ODBC source. First things would probably do find out what tables are there and what rows, then you can write something like
select * from some_table_in_the_dbf_file
and move the result in the SQL Server 2005 table.

This should do with any programming language supporting odbc. What else should we know about your data?

Regards
Friedrich
0
 
LVL 8

Author Comment

by:MOA81
ID: 18831375
Dear Friedrich
Do you any other easier way to do this ???
rather than creating an ad hoc third party program ???

isn't there any direct way to read from SQL Server 2005
0
 
LVL 8

Author Comment

by:MOA81
ID: 19167465
any more comments guys on this one, still i think there is a better answer, sorry to bother you with this one
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
unable to reinstall SCVMM 2012 R2 - SQL errors. 5 39
Star schema daily updates 2 35
Special characters in a TCPDF 4 26
How come this XML node is not read? 3 28
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

749 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