[Company Logo Image] 

Home Up Contents Coffee Break Credits Glossary Links Search

 
Msg 7399 Msg 7303 OPENROWSET

 

 

Home
Analysis Services
Azure
CLR Integration
High Availability
Open Source
Security
SQL Server 2008
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2019
Tips
Troubleshooting
Tuning

Msg 7399 Msg 7303 OPENROWSET.


Applies to: SQL Server 2012 Enterprise Edition.
 

Problem Description.
 

We were trying to read the data from an Excel spreadsheet using the following SELECT statement:

SELECT *
FROM
OPENROWSET
('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\morillo\morillo.xls;HDR=YES', 'select TOP 110 * from [Sheet1$]') AS A;


When we executed the statement we received the following errors:

Msg 7399, Level 16, State 1, Line 2
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" reported an error. The provider did not give any information about the error.

Msg 7303, Level 16, State 1, Line 2
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".



Cause.

The spreadsheet document was already in use (was open) and OPENROWSET was not able to open it.




Solution.


Once the spreadsheet was closed we executed the statement successfully.



 

 

 

.Send mail to webmaster@sqlcoffee.com with questions or comments about this web site.