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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

VB ADO Multiple RecordSets

  • 02-04-2003 1:08pm
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 Posts: 2,781 ✭✭✭amen


    Thanks Evil Phil
    thats exactly what I was looking for


Advertisement