|
-
Aug 31st, 2000, 12:31 PM
#1
Thread Starter
Member
I'm using an ftp class that gets a directory list
into a disconnected recordset
but when i have the recordset I can't get a string out of it to put into a variable.
dim rs as recordset
rs = oFTP.getdirectorylist
rs.open
rs.movefirst
dim vTemp as string
while not rs.eof
'vTemp = rs' -->no good
vTemp = Cstr(rs)' -->no good
any ideas??
-
Aug 31st, 2000, 01:02 PM
#2
_______
<?>
dim rs as recordset
rs = oFTP.getdirectorylist
rs.open
rs.movefirst
dim vTemp as string
while not rs.eof
'vTemp = rs' -->no good
vTemp = Cstr(rs)' -->no good
vTemp = rs!yourfieldname
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Aug 31st, 2000, 01:14 PM
#3
Fanatic Member
Code:
While Not (rs.EOF)
vTemp = rs.Fields("field")
'... do some actions
rs.MoveNext
Wend
-
Aug 31st, 2000, 02:28 PM
#4
Monday Morning Lunatic
Make sure you do an rs.MoveFirst before going into the loop.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Sep 2nd, 2000, 02:37 AM
#5
Fanatic Member
Yes off coarse.
Code:
If (rs.RecordCount > 0) then
'Test the RecordCount property, otherwise, zero-length tables will give an error!
rs.MoveLast
rs.MoveFirst
'The table has been refreshed...
While Not (rs.EOF)
vTemp = rs.Fields("field")
'... do some actions
rs.MoveNext
Wend
End if
rs.Close 'Always close the RecordSet!
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
|