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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysql to text in asp

Status
Not open for further replies.

parames

MIS
Jun 26, 2000
71
MY
hello..
i'm using mysql database.. can anybody guide me how to take data from mysql database and put it in .txt file in asp...

thanks a lot..

rgds,
parames.s
 
I assume that youknpw how to open a connection and a recordset of the data that you want to write to a text file, so we'll skip to the final step..

Using the FSO (file system object collection):

sFullFilePath = 'full path to the text file on the server,
'you can make use of the server.mappath(...) command here
sOutput = 'enter the text that you want to save to the file

Set fs = CreateObject("Scripting.FileSystemObject")
Set fOutput = fs.CreateTextFile(sFullFilePath, True)
fOutput.Write(sOutput)
fOutput.Close

for more help go to the msdn search page and look for help on ASP and FSO:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top