[ACCEPTED]-How to import a DBF file in SQL Server-dbf
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')
0
I was able to use the answer from jnovation 5 but since there was something wrong with 4 my fields, I simply selected specific fields 3 instead of all, like:
select * into CERTDATA
from openrowset('VFPOLEDB','C:\SomePath\CERTDATA.DBF';'';
'','SELECT ACTUAL, CERTID, FROM CERTDATA')
Very exciting to finally 2 have a workable answer thanks to everyone 1 here!
What finally worked for us was to use the 6 FoxPro OLEDB Driver and use the following syntax. In our case 5 we are using SQL 2008.
select * from
openrowset('VFPOLEDB','\\VM-GIS\E\Projects\mymap.dbf';'';
'','SELECT * FROM mymap')
Substitute the \\VM-GIS...
with 4 the location of your DBF file, either UNC 3 or drive path. Also, substitute mymap
after 2 the FROM
with the name of the DBF file without 1 the .dbf extension.
This tools allows you to import to and from 1 SQL Server.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.