Display Multiple Recordsets from a Stored Procedure

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KyleHockenberry
    New Member
    • Jun 2012
    • 2

    Display Multiple Recordsets from a Stored Procedure

    I'm running a pass-through query in Access that executes a stored procedure. However the Stored procedure has multiple record sets(5). When the query is ran it only displays the first Record set, how do I display all of them?

    Here is the exec stored procedure code for the pass-through query. The stored procedure also has a View parameter in the ' '

    exec [STORED PROCEDURE NAME] 'view2011humors '

    Is the only way to go about this using VBA? I feel like you should just be able to display it all.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You can't. Union the results if they have the same fields. Otherwise, put each one in a different stored procedures and create different pass through queries.

    Comment

    • KyleHockenberry
      New Member
      • Jun 2012
      • 2

      #3
      I have to be able to just use this stored procedure so I guess my only option is to use VBA to read through the different recordsets. Does anybody have code for doing this in an Access Report?

      Thanks for the quick response Rabbit

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        You can use the .NextRecordset method to move to the subsequent recordset.

        Comment

        Working...