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 2008 Forums
 Other SQL Server 2008 Topics
 OpenRowSet problems

Author  Topic 

barak.karni
Starting Member

4 Posts

Posted - 2010-08-10 : 04:13:35
hello all,
i have a problem using the openrowset function
i am trying to import data from excel 2003 into sqlserver2008 with this code:

select * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;DATABASE=192.168.0.62\c:\tester.xls', 'Select * from [1$]')

and i get the following 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)".

any help will be greatly appreciated.

thanks in advance, barak.

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2010-08-10 : 06:22:19
This path is probably not valid: 192.168.0.62\c:\tester.xls

I'd think you need to change it to something like this: \\192.168.0.62\c$\tester.xls

- Lumbago

My blog (yes, I have a blog now! just not that much content yet)
-> www.thefirstsql.com
Go to Top of Page

barak.karni
Starting Member

4 Posts

Posted - 2010-08-10 : 07:01:55
ihave taken the file off the server, it is now on my local pc, yet i am connected to the sql server (my local is not the server). but yet, all i see is an error saying:


Cannot get the column information from OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".

the code now is:


Cannot get the column information from OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".

which is roughly the same.

no columns specifyed and i can't find a reference to the problem
Go to Top of Page
   

- Advertisement -