rs.NextRecordset



I am trying to use ADODB 2.7 to call a SQL Sever Stored procedure that
returns multiple recordsets.

I am aware of the rs.NextRecordset method to get the next recordset in the
colelction, but my problem is that the recordset is CLOSED when it is
returned.
WHY!!!???

I found this documentation but it doesn't explain why this happens. If it is
closed, how do I iterate thru the records in the rs?

Set recordsetobject = recordsetobject.NextRecordset (RecordsAffected)

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:
a.. a closed recordset with records,
b.. a closed non-row returning recordset containing no records,
c.. or an empty recordset with both BOF and EOF equal to True.

I am calling the SP using a COmmand object like so:

Set Cmd.ActiveConnection = mobjConn
Cmd.CommandType = adCmdStoredProc
Cmd.CommandText = SP.Name
'Add params , if any

Set rs = Cmd.Execute()

Any help would be greatly appreciated.
Chad



.



Relevant Pages

  • Re: ADO->Jet, seek method EOF, all subsequent setting the index fa
    ... 10,000 lookups using command method: ... table direct recordset into my important table, ... > I would setup a Command object with an-adhoc SQL query on the PK and Record ... > parameters and close the Recordset object when finished. ...
    (microsoft.public.data.ado)
  • Re: ADO->Jet, seek method EOF, all subsequent setting the index fa
    ... 10,000 lookups using command method: ... table direct recordset into my important table, ... > I would setup a Command object with an-adhoc SQL query on the PK and Record ... > parameters and close the Recordset object when finished. ...
    (microsoft.public.data.ado)
  • Re: File and Folder Listing.
    ... >Dim strPath 'Path of directory to show ... >' A recordset object variable and some selected constants from adovbs.inc. ... >' In order to be able to sort them easily and still close the FSO relatively ...
    (microsoft.public.inetserver.asp.general)
  • Q. Problems with combo box NotInList event
    ... Private Sub Combo133_NotInList ... 'connection and recordset object variables ... 'Dim cn As ADODB.Connection ...
    (microsoft.public.access.formscoding)
  • Re: Run time error 3421
    ... I believe the problem is that your OpenRecordset statement is incorrect. ... recordset is an object variable that represents the Recordset object you ... > Set rstRecords = dbsDatabase.OpenRecordset("SELECT Max ...
    (microsoft.public.access.formscoding)