Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Re: how to export table to file using MS Text Driver


Message #1 by agaisin@c... on Thu, 11 Apr 2002 22:19:39 +0100
Yes there are a million and one ways to accomplish this - DTS, bcp, straight asp (using fso) and the
list goes on...
After doing it one of the aforementioned ways, out of curiousity I tried using the Microsoft Text Driver with the code below:

set cn = server.CreateObject("adodb.connection")
cn.Open "provider=sqloledb;data source=XXX;initial catalog=edvaps;uid=XXX;pwd=XXX;"
Cn.Execute "SELECT * INTO [ExportData.txt] IN 'c:\Temp' 'Text;' FROM [MyTable]"

where the connection string is valid and I want to export MyTable into the text file C:\Temp\ExportData.txt
The error I get is "Incorrect syntax near the keyword 'IN' "
Based on the few examples I've seen (would love to be pointed to more articles or documentation) this should work.

Any ideas?

Thanks in advance,
Arthur Gaisin



  Return to Index