How can you import a foxpro DBF file in SQL Server?
Importing the DBF fileOpen Access, select the Create New Database Using Blank Database option. Import BLANK. DBF by selecting the File, Get External Data option. Then choose Import.
To import DBF files, first use Microsoft Access or Microsoft Excel to import the data from DBF files into an Access database or Excel spreadsheets. Then, use the SQL Server Import and Export Wizard to import the Access database or Excel spreadsheets that contain the data from the DBF files.
Use a linked server or use openrowset, example
SELECT * into SomeTable
FROM OPENROWSET('MSDASQL', 'Driver=Microsoft Visual FoxPro Driver;
SourceDB=\\SomeServer\SomePath\;
SourceType=DBF',
'SELECT * FROM SomeDBF')
I was able to use the answer from jnovation but since there was something wrong with my fields, I simply selected specific fields instead of all, like:
select * into CERTDATA
from openrowset('VFPOLEDB','C:\SomePath\CERTDATA.DBF';'';
'','SELECT ACTUAL, CERTID, FROM CERTDATA')
Very exciting to finally have a workable answer thanks to everyone here!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With