Hello
Try this:
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set ctf = fs.CreateTextFile(Server.MapPath("test.csv"), 2)
If Not rset1.EOF Then
ctf.WriteLine("ISP,Address") '*** If you want titles to your columns
for your csv file
While Not rset1.EOF
ctf.WriteLine(""""&(rset1.Fields("ISP").Value)&""","""&(rset1.Fields("Address").Value)&"""")
rset1.movenext
Wend
End if
ctf.Close
Set fs=nothing
'**************************************
simple loops through your recordset writing out the fields on a line
with commas and creates new line per record, it will also put double
quote around all values, you will need to create a recordset, replace
my recordset tags with yours e.g. (rset1.Fields("ISP").Value), you
will also need to change the titles e.g. ("ISP,Address") to the titles
you want for each column.
CSV File Format should look something like: (using my recordset
fields)
ISP,Address
"ISP Name1","ISP Address1"
"ISP Name2","ISP Address2"
etc.
Hope this helps, I have quickly simplified code hope I haven't made
any mistakes.