1
Answer

SQL SERVER

Photo of gaurav bembi

gaurav bembi

14y
1.7k
1
I want to import data from a spreadsheet using OPENROWSET on a production server. This is my query:

SELECT *
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\dataSource.xls;HDR=YES',
'SELECT * FROM [Foglio1$]')

I get the following error message (mine is in italian, here is the english version):

OLE DB provider "microsoft.jet.oledb.4.0" for linked server "(null)" returned message "Unspecified error".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "microsoft.jet.oledb.4.0" for linked server "(null)".

Answers (1)

0
Photo of Felipe Ramos
NA 2.6k 91.4k 14y
If you are using SQL Server it would be easier to right click your database and use Import Data under the Tasks menu item. It would allow you to select source of Access/Excel/Other Servers.