Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link SQL 2005 server to a file 2

Status
Not open for further replies.

micang

Technical User
Aug 9, 2006
626
US
SQL 2005

Hi All,

If I run the following code, it works no problem (provided that the D:\ is the drive of the server where SQL Server 2005 is installed).
Code:
SELECT * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0', 'Data Source=D:\trans.xls;Extended Properties=Excel 8.0')...Sheet1$

If however, I change the path to a location on the network like:
Code:
SELECT * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0', 'Data Source=\\server1\FOLDER\trans.xls;Extended Properties=Excel 8.0')...Sheet1$

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)".

Does anyone maybe know if this is a network problem or a SQL problem?

Any info appreciated.

Thanks

Michael
 
I suspect it's a permissions problem.



-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thanks guys, I will ask the IT people to check this. I get the feeling that more than likely it is a permission problem as you both suggest.

Many thanks.

Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top