|
-
May 21st, 2004, 10:41 AM
#1
Thread Starter
Banned
-
May 21st, 2004, 11:10 AM
#2
VB Code:
Dim iHandle as Integer
iHandle = FreeFile
Open "C:\MyFile.txt" for Output as #iHandle
Do Until RS.EOF
Write #iHandle, RS("ID") & "," & RS("Name")
RS.MoveNext
Loop
Close #iHandle
assuming RS is already been opened (and closed after the loop)
You can use Write or Print in that line
Print writes the data exactly, and Write prints the data with quotes around it (good if you want to read in data later)
also I just wrote this.. didnt test so if it comes up with any errors, just let me know
-
May 21st, 2004, 11:11 AM
#3
Open "C:\filename.txt" for output as #1
Do while not rs.EOF
tmp = ""
For x = 0 to rs.fields.count -1
tmp = tmp & " " & rs.fields(x) 'put a delimiter in there?
next
Print #1, tmp
rs.movenext
Loop
Close #1
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
May 21st, 2004, 11:13 AM
#4
kleinma! to quick on the draw!
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
May 21st, 2004, 11:13 AM
#5
haha, yeah, but nice loop for the RS fields
-
May 21st, 2004, 12:03 PM
#6
Thread Starter
Banned
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|