Re: rs.NextRecordset



"Chad" <chad.dokmanovich@xxxxxxxxxx> wrote in
news:dhjbts$3n4$1@xxxxxxxxxxxxxxxxxxx:

> 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 do not believe what you have written is correct. For example, you would
get

RecordsAffected <> 0 with a closed recordset

from an UPDATE query - the records are updated but none are returned as a
recordset.

HTH



.



Relevant Pages

  • Re: store procedure problem with recordset
    ... > When a SP returns a Recordset but the State is ... > adStateClosed, it means that the query ran, returned a rowset which had no ... adClient) to return multiple recordsets that can be bi-directionally ... >> i tried to change store, not passing variables but constant (the row with ...
    (microsoft.public.vb.general.discussion)
  • Re: store procedure problem with recordset
    ... > When a SP returns a Recordset but the State is ... > adStateClosed, it means that the query ran, returned a rowset which had no ... adClient) to return multiple recordsets that can be bi-directionally ... >> i tried to change store, not passing variables but constant (the row with ...
    (microsoft.public.vb.database)
  • Re: store procedure problem with recordset
    ... > When a SP returns a Recordset but the State is ... > adStateClosed, it means that the query ran, returned a rowset which had no ... adClient) to return multiple recordsets that can be bi-directionally ... >> i tried to change store, not passing variables but constant (the row with ...
    (microsoft.public.vb.database.ado)
  • 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 ... The next Recordset object can be returned as: ...
    (microsoft.public.data.ado)
  • Re: Adding Recordsets to an Existing Recordset
    ... I have a situation wihere I need to grab ... >> a recordset back. ... >> recordset and make the use of the NextRecordset method. ... >> procedures for my command types, so writing the SQL statement is out. ...
    (microsoft.public.data.ado)