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 |
|
irfanshirur
Starting Member
21 Posts |
Posted - 2009-11-12 : 08:14:11
|
| hi I am trying to export the query result to a text file.So using this query to export , its giving som error.Query :INSERT OPENROWSET('Microsoft.Jet.OLEDB.4.0','Text;Database=C:\SQL.txt',SINGLE_CLOB)--query goes hereselect top 5 * from schtasksWe need to create text file or it will create by default ?Error :OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" returned message "'C:\SQL.txt' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.".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)".Please can any one help me to resolve this issue.Thanks RegardsMohammed Irfan |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-11-12 : 08:15:57
|
| Note that the file shoule be in Server's directoryMadhivananFailing to plan is Planning to fail |
 |
|
|
irfanshirur
Starting Member
21 Posts |
Posted - 2009-11-12 : 08:18:06
|
| Thanks for the reply.i am using my local SQL, and also created the file. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-11-12 : 08:50:30
|
| Try thisINSERT OPENROWSET('Microsoft.Jet.OLEDB.4.0','text;HDR=YES;FMT=FixedLength;Database=c:\', SQL#txt)select top 5 * from schtasksMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|