IS there anyone familiar with migrating DBF files to SQL? I have an application that is going to dump data to a DBF file then I need to get it into SQL for reporting on the data.
If it's a one time operation, you could manually import into Access or Excel and then upload from there to SQL. If it's going to be something that you do regularly, then if memory serves, there should be an ODBC or OLEDB driver available from Microsoft that can read .DBF files.
You could do something like the below which will require you to use the foxpro driver. Syntax may not be up to scratch, but I'm sure you could work it out. Try :
C#:
SELECT *intoYourtableFROMOPENROWSET('MSDASQL', 'Driver=MicrosoftVisual foxpro driver here;
SourceDB =\Your server path here;
SourceType = DBF','SELECT * FROM YourDBF')
Perhaps this might help you. Fox pro reads these DB file types. So you can find the driver on there too : Visual FoxPro Downloads
Connection strings for DBF / FoxPro. Connect using Microsoft.Jet.OLEDB.4.0, Microsoft.ACE.OLEDB.12.0, OleDbConnection, MS dBASE ODBC and ODBC .NET Provider.
If you can provide a little more detail as in what is your current problem and what exactly you are not having much luck with, maybe we can try to help resolve your current problem so you can begin your migration process?
this is what I have done
did install the ole db provider for foxpro
ran this
select * into dbf
from openrowset('MSDASQL','C:\rcs\ORDERS.DBF';'';
'','SELECT * FROM ORDERS')
and get this at this time
OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "(null)".
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.