使用ADO的NextRecordset属性如:
Dim cmd As New ADODB.Command
Dim rs As ADODB.Recordset    Cmd.ActiveConnection = "DSN=MySamples;UID=sa"
Cmd.CommandText = "MyNextProc"
Cmd.CommandType = adCmdStoredProcSet rs = Cmd.Execute()
While Not rs Is Nothing
    If (Not rs.EOF) Then
        Debug.Print rs(0)
    End If
    Set rs = rs.NextRecordset()
Wend

解决方案 »

  1.   

    http://msdn.microsoft.com/library/en-us/ado270/htm/mdaexamples_vb02_6.asp?frame=tru
      

  2.   

    cb里的adoquery或其他ado控件也有NextRecordset属性,自己一试就知道了。
      

  3.   

    create procedure aa
      as
    set nocount on    select * from aaa   ---表名
       select sum(col1) as total from aaa group by col2  
    我在cb中怎么才能获得
       select sum(col1) as total from aaa group by col2  set nocount off
      

  4.   

    ADODataSet1->Recordset = ADOQuery1->NextRecordset;