The method according to Zou import data from excel into sqlServer in the wrong! ! !

Category: MS-SQL Server -> Applications Author: hjkhkjlh Date: 2001-07-08 20:07:24
 
hjkhkjlh
2001-07-08 20:07:24
In Query Analyzer:
select *
from OPENROWSET ('MICROSOFT.JET.OLEDB.4.0', 'Excel 5.0; HDR = YES; DATABASE = c: \ test.xls', test $)

Results:
Server: Msg 7399, Level 16, State 1, Line 5
OLE DB Provider 'MICROSOFT.JET.OLEDB.4.0' error. Provider did not give any information about the error.

NOTE: test.xls exist in sqlServer machine.

please enlighten experienced comrades

lyhlyhchina
2001-07-08 20:14:57
test $ table name you have this job?

a0435feifei
2001-07-08 20:20:40
permissions it, you are using the sa login you? I tested with your statement that there is no problem
mblly1234
2001-07-08 20:29:02
in your statement is executed when you are not already using test.xls excel open the file, if so, to close excel and then execute the statement.
xujian8919
2001-07-08 20:36:52
agree elia (porcelain)
shenjialiang001
2001-07-08 20:53:42
Yes, in the excel file to see the
liyouguo_888
2001-07-08 21:03:27
I am using the sa login, uh, strange. : (
zhengpeichuang
2001-07-08 21:35:41
Problem solved: this is what I excel table using bcp saved, you need to rename the sheet and the rear can be used to upgrade formats OPENROWSET

Thanks anyway