我試圖從DBF文件導入數據到SQL表使用以下命令 -如何使用SQL腳本將數據從DBF導入SQL?
select *
from openrowset('MSDASQL',
'Driver={Microsoft dBase Driver (*.dbf)};DBQ=E:\data\;',
'select * from E:\data\a.dbf')
但它沒有說
OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC dBase Driver]General Warning Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x120 Thread 0x3084 DBC 0x303dfbc Xbase'.".
OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC dBase Driver] Disk or network error.".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "(null)".
任何線索,爲什麼它給錯誤?對於第二個錯誤,我已經完全訪問臨時文件夾,如某些博客所建議的。它仍然顯示兩個錯誤。
http://www.excel-sql-server.com/excel-import-to-sql-server-using-distributed-queries.htm – user1097489