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.
| Author |
Topic |
|
hariharans87
Starting Member
6 Posts |
Posted - 2011-07-25 : 08:07:55
|
| Query1:SELECT *FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=F:\Test.xls', 'SELECT * FROM [Sheet1$]') Query2:SELECT *FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=\\user11\Test\Test.xls;HDR=YES', 'SELECT * FROM [Sheet1$]')Please explain how to user Query2.Thanks,Hari |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-07-25 : 08:38:46
|
| You need to specify the folder nameSELECT *FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=\\user11\F\Test\Test.xls;HDR=YES','SELECT * FROM [Sheet1$]')MadhivananFailing to plan is Planning to fail |
 |
|
|
hariharans87
Starting Member
6 Posts |
Posted - 2011-07-25 : 08:58:57
|
quote: Originally posted by madhivanan You need to specify the folder nameSELECT *FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=\\user11\F\Test\Test.xls;HDR=YES','SELECT * FROM [Sheet1$]')MadhivananFailing to plan is Planning to fail
I have given the correct path surely because i tested. The error is:Msg 7399, Level 16, State 1, Line 1The 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 1Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)". |
 |
|
|
|
|
|
|
|