Syntax
| Set recordsetobject = recordsetobject.NextRecordset([RecordsAffected])
| ||||
---|---|---|---|---|---|
Description
| Clears the current Recordset object and returns the next Recordset object.
The NextRecordset method is called when you want to clear the current Recordset and return the next Recordset.
The next Recordset object can be returned as:
You can use this method to advance through a compound command statement or a stored procedure that needs to return multiple results. For example, in a compound command statement, ADO will process the first query and return the resultant Recordset. By calling the NextRecordset method, you can next process the second query (and so on). After all of the results are returned, the Recordset will be set to nothing.
There is one optional output parameter.
| ||||
See Also
| |||||
Example
| Do While Not objRecordset.State = adStateClosed
For Each objField In objRecordset.Fields
Debug.Print objField.OriginalValue
Debug.Print objField.UnderlyingValue
Debug.Print objField.Value
Next
Set objRecordset = objRecordset.NextRecordset
Loop
|