EXCEL VBA - ADO for multiple datasets

Posted on 2007-08-02
Last Modified: 2008-01-09

using ADO, I'm executing a stored procedure that should return 2 datasets in a recordset object

PROBLEM: when i "dump" the data into a spreadsheet i only see dataset #1.

Is there a way to extract each dataset from the recordset?
Question by:gordonn
    1 Comment
    LVL 27

    Accepted Solution

    If rs is the recordset object you retrieve then use the following to advance to the next recordset after you've processed the first one:

    Set rs = rs.NextRecordset

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Article by: Martin
    Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
    I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
    This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
    This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now