Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VB ADO Multiple RecordSets

Options
  • 02-04-2003 2:08pm
    #1
    Registered Users Posts: 2,781 ✭✭✭


    Hi,

    I using ADO to execute stored procedures(SP) on a SQL Server database.

    My SPs return back multipl recordsets.
    Using the ado.getrows methods I can only access the first recordset.

    I know there is a way to access subsequent recordsets(because I did it years ago) but I cannot remember how to do it.

    Does anyone have any ideas ?


Comments

  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    I may have some ideas, can you post your code first though?

    cheers

    p.s. What version of ADO are you using?


  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    I think this might be what you're looking for. This is ADO 2.1
    [COLOR=darkblue]Do Until[/COLOR] adoRS [COLOR=darkblue]Is Nothing[/COLOR]  
        
            [COLOR=darkblue]While Not[/COLOR] adoRS.EOF
                
                [COLOR=seagreen]'// recordset code here[/COLOR]
                adoRS.MoveNext
                
            [COLOR=darkblue]Wend[/COLOR]
            
            [COLOR=darkblue]Set[/COLOR] adoRS = adoRS.NextRecordset
        
    [COLOR=darkblue]Loop[/COLOR]
    

    So when you get to the end of the first recordset you move onto the next one.

    Hope this helps.


  • Registered Users Posts: 2,781 ✭✭✭amen


    Thanks Evil Phil
    thats exactly what I was looking for


Advertisement