Yes, you have to have a different recordset object for each recordset returned to you; how else would you differentiate between them?

The Collect method is a simple method of retrieving the fields numerically when you know how many fields you want and in what order they are going to appear. It is 0-based, so your first field will be 0, your last field will be N-1, where N is the number of fields you requested. This is like PHP's if ($row = mysql_fetch_row($rs)), after which you would use $row[0] to reference the row.

The ADODB.Recordset object's .MoveNext method functions the same way performing another mysql_fetch_row() would; it moves the recordset pointer to the next record.

VBScript:

While Not rs.EOF
  • ' Do something with the current record, like retrieving its values, changing them, updating them, etc.
    rs.MoveNext
WEnd

PHP:

while ($row = mysql_fetch_row($rs)) {
  • /* Do something with the current record, like retrieving its values, changing them, updating them, etc.
}

mIRC:

while (!$com(rs, EOF, 2)) {
  • ; Do something with the current record, like retrieving its values, changing them, updating them, etc.
    !.echo -q $com(rs, MoveNext, 1)
}