I have been using the following code for well over a year to import an excel file and it worked perfectly but now all of a sudden I am getting an error. Does anyone have thoughts on what could cause it to stop working.
set @select = 'SELECT * INTO ' +'temptable'+' FROM OPENROWSET('+ ''''+'Microsoft.ace.oledb.12.0'+''''+','+''''+'Excel 8.0;Database='+@path+@filename+''''+', '+''''+'SELECT * FROM [sheet1$]'+''''+@paren
this is the error message I get now.
OLE DB provider "Microsoft.ace.oledb.12.0" for linked server "(null)" returned message "Unspecified error".
Msg 7303, Level 16, State 1, Line 3
Cannot initialize the data source object of OLE DB provider "Microsoft.ace.oledb.12.0" for linked server "(null)
set @select = 'SELECT * INTO ' +'temptable'+' FROM OPENROWSET('+ ''''+'Microsoft.ace.oledb.12.0'+''''+','+''''+'Excel 8.0;Database='+@path+@filename+''''+', '+''''+'SELECT * FROM [sheet1$]'+''''+@paren
this is the error message I get now.
OLE DB provider "Microsoft.ace.oledb.12.0" for linked server "(null)" returned message "Unspecified error".
Msg 7303, Level 16, State 1, Line 3
Cannot initialize the data source object of OLE DB provider "Microsoft.ace.oledb.12.0" for linked server "(null)