How can you import a foxpro DBF file in SQL Server?
17
votes
5 Answers
19
votes
6
votes
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!
2
votes
2
votes
What finally worked for us was to use the FoxPro OLEDB Driver and use the following syntax. In our case we are using SQL 2008.
select * from
openrowset('VFPOLEDB','\\VM-GIS\E\Projects\mymap.dbf';'';
'','SELECT * FROM mymap')
Substitute the \\VM-GIS... with the location of your DBF file, either UNC or drive path. Also, substitute mymap after the FROM with the name of the DBF file without the .dbf extension.