Anyone getting NextRecordset to work properly?

All:

I am trying to use the following code to return multiple result sets from
SQL Server 7. With my test data, 12 result sets are returned and result sets
6, 10, and 11 are empty.

The code fails on the line highlighted by '*****' when processing the third
result set (which is *not* empty). If I use ADOExpress, I get a stack
overflow error. If I use the Diamond ADO components, I receive a "The
operation requested by the application is not supported by the provider."
error.  According to MS kb article Q193352, this error occurs when the
initial recordset is disconnected prior to calling Nextrecordset. I do not
believe that my code is disconnecting anything. Setting the Active property
of tmpRecordset has no effect on the error propagation.

BTW, I am using D5 enterprise with Update Pack 1 and ADO
version 2.1 against SQL Server 7.

If you have any insights, I would appreciate reading them.

Mike

procedure TDataModule1.ADORetrieval2AfterOpen(DataSet: TDataSet);
var
    intArrayCounter : Byte;
    intRowsAffected : OLEVariant;
    tmpRecordset    : TdADODataSet;
    x               : Integer;
begin
InitializeArrays;
try
    x := 0;
    tmpRecordset := TdADODataset.Create(nil);
    tmpRecordset.Connection := ConSQLServer2;
    For intArrayCounter := 1 to MAXRESULTSETS do
        begin
//        tmpRecordset.Active := False;
        If intArrayCounter = 1 then
            begin
            tmpRecordset.RecordsetObject := ADORetrieval2.RecordsetObject;
//            tmpRecordset.Active := True;
            If (tmpRecordset <> nil) AND
               (tmpRecordset.State <> dsInactive ) AND
               (Assigned(tmpRecordset)) then
               arrDatasets[intArrayCounter].RecordsetObject :=
                    tmpRecordset.RecordsetObject;
            end
        Else
            begin
            Repeat
                tmpRecordset.RecordsetObject :=
*****
ADORetrieval2.RecordsetObject.NextRecordset(intRowsAffected); *****
            Until (tmpRecordset = nil) OR (tmpRecordset.State <>
dsInactive);
//            tmpRecordset.Active := True;
            If Assigned(tmpRecordset) then
               arrDatasets[intArrayCounter].RecordsetObject :=
                  tmpRecordset.RecordsetObject;
            end;
        arrDatasets[intArrayCounter].Active := True;
        end;    // For
finally
    tmpRecordset.Free;
end;
end;