Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 OpenRowSet

Author  Topic 

vaibhavktiwari83
Aged Yak Warrior

843 Posts

Posted - 2010-09-04 : 05:48:41
Hello all,

I am executing below query.

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

I am getting error

Msg 7399, Level 16, State 1, Line 1
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 1
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".

Please help me out...

Vaibhav T

To walk FAST walk ALONE
To walk FAR walk TOGETHER

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2010-09-04 : 18:25:51
make sure the file exists, and also very important MAKE SURE the file is closed when you try to run the query. If the spreadsheet is open you will get that error.


Success is 10% Intelligence, 70% Determination, and 22% Stupidity.
\_/ _/ _/\_/ _/\_/ _/ _/- 881
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-09-06 : 04:47:56
More troubleshooting
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

vaibhavktiwari83
Aged Yak Warrior

843 Posts

Posted - 2010-09-07 : 03:02:44
Thanks for the reply.
I found the silly mistake the file name was not matching...


Vaibhav T

To walk FAST walk ALONE
To walk FAR walk TOGETHER
Go to Top of Page
   

- Advertisement -