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 2000 Forums
 SQL Server Development (2000)
 Openrowset error

Author  Topic 

vishu_av
Yak Posting Veteran

69 Posts

Posted - 2007-12-07 : 04:06:30
Hi All,
This problem is addressed already in this forum.
I have something to add to it.

I need to write into an excel sheet present in a system( which is not any server but a client machine installed with Microsoft XP)

I get the following error when i run this

INSERT INTO OPENROWSET('MICROSOFT.JET.OLEDB.4.0',
'EXCEL 8.0;DATABASE=\\Servername\EXCELREPORTS\TEST.xls;','SELECT * FROM [AUDIT_LOG$]') SELECT * FROM TEMP_TABLE

('Servername' is another IP which is not SQL server and 'EXCELREPORTS' folder is given full (R/W) permission)

The error is as below...

OLE DB error trace [OLE/DB Provider 'MICROSOFT.JET.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the error.].
Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MICROSOFT.JET.OLEDB.4.0' reported an error. The provider did not give any information about the error.

Should i install 'MICROSOFT.JET.OLEDB.4.0' provider or something?

Thanks in advance..!!

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-12-07 : 04:16:45
See http://weblogs.sqlteam.com/peterl/archive/2007/10/24/Getting-errors-when-working-with-Excel-and-SQL-Server.aspx



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

vishu_av
Yak Posting Veteran

69 Posts

Posted - 2007-12-07 : 04:48:40
Hi Peso.
I am afraid i still get the similar error..

[OLE/DB provider returned message: [Microsoft][ODBC Excel Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.]
OLE DB error trace [OLE/DB Provider 'MSDASQL' IDBInitialize::Initialize returned 0x80004005: ].
Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.

I dont have any instance of the excel sheet open as the error says...

Thanks
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-12-07 : 04:51:16
The new error message says it all!

Either the file is already opened by another user, or the file does not exists.
You can't have the file open in Excel application while you access the file with OPENROWSET.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -