Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import from Foxpro 2.6 to SQL2000

Status
Not open for further replies.

cp84

Programmer
Apr 2, 2003
11
0
0
GB
I have to import and modify Foxpro 2.6 .dbf files in a .NET application using SQL 2000. Is it best to use "Linked Server" as sugested by MS or can a schema file be used and if so whats the best software to create it.

All replies most appreciated.
 
I am not familiar with "Linked Server", but here's what I usually do when converting FoxPro 2.6 tables to SQL.

1. Create a "FoxPro ODBC Free Table directory" and point the directory to the path/folder where your tables are located. (You may have to do this several times if you data is found in different folders)

2. From SQL Server, use the "Import Data..." (right-click on the 'Databases' folder from the Enterprise Manager) to import the FoxPro tables. Use "Microsoft Visual FoxPro" driver as your "Data Source", then select the name of the FoxPro ODBC you created in Step 1. Click "Next" and simply follow the directions and this should import all your FoxPro table to SQL Server.

USER CAVEAT: I've run into problems with tables that have date field and SQL Server is unable to convert the data correctly. To get around this problem, simply create a view of the table and create a formula field which will return .NULL. for any dates that are blank. If you go this route, then you have to setup your ODBC connection as a "FoxPro Database" instead of a "Free Table directory".

I hope this helps....

Arles
 
How do you optimize data transfer services, because when I tried to convert the foxpro 2.6 tables(6 in all) with about the max being 56,000 records it has taken hours? I am using the above steps above, am I doing something wrong?
 
Hello Arles,

Please forgive me, but I am in this circumstance right now. I am exactly where you are but I need the data in a table within SQL for later use by another group for a web page link..

You create the view in Foxpro or SQL?

Please explain further.. Thank you very much!

Donna
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top