DataAdapter and multiple result sets

Discussion in 'ASP .Net Web Services' started by Michael C#, May 10, 2005.

  1. Michael C#

    Michael C# Guest

    I have a SQL Server stored procedure that returns multiple recordsets (three
    of them), in the same way that sp_helpdb does (try entering EXEC SP_HELPDB
    'MASTER' in Query Analyzer for an example). I want to populate my DataSet
    with all three recordsets, as System.Data.DataTables. I'm not sure how to
    move to the second and third resultsets in this case. Normally, with an
    DataReader I would use the .NextResult method, but I'm trying to avoid the
    DataReader and just use the DataAdapter's Fill method. Is this possible?

    Thanks in advance
     
    Michael C#, May 10, 2005
    #1
    1. Advertising

  2. Use a dataset and fill dataset with data adapter. All result sets will be
    placed in different data tables.

    --

    Thanks,
    Yunus Emre ALPÖZEN
    BSc, MCAD.NET

    "Michael C#" <> wrote in message
    news:...
    >I have a SQL Server stored procedure that returns multiple recordsets
    >(three of them), in the same way that sp_helpdb does (try entering EXEC
    >SP_HELPDB 'MASTER' in Query Analyzer for an example). I want to populate
    >my DataSet with all three recordsets, as System.Data.DataTables. I'm not
    >sure how to move to the second and third resultsets in this case.
    >Normally, with an DataReader I would use the .NextResult method, but I'm
    >trying to avoid the DataReader and just use the DataAdapter's Fill method.
    >Is this possible?
    >
    > Thanks in advance
    >
     
    Yunus Emre ALPÖZEN [MCAD.NET], May 10, 2005
    #2
    1. Advertising

  3. Michael C#

    Michael C# Guest

    Thank you. I was doing that, but there was an error in the parameters I was
    passing so the results were garbage - that's why it wasn't working. It's
    all good now though. Thanks again!

    "Yunus Emre ALPÖZEN [MCAD.NET]" <> wrote in message
    news:...
    > Use a dataset and fill dataset with data adapter. All result sets will be
    > placed in different data tables.
    >
    > --
    >
    > Thanks,
    > Yunus Emre ALPÖZEN
    > BSc, MCAD.NET
    >
    > "Michael C#" <> wrote in message
    > news:...
    >>I have a SQL Server stored procedure that returns multiple recordsets
    >>(three of them), in the same way that sp_helpdb does (try entering EXEC
    >>SP_HELPDB 'MASTER' in Query Analyzer for an example). I want to populate
    >>my DataSet with all three recordsets, as System.Data.DataTables. I'm not
    >>sure how to move to the second and third resultsets in this case.
    >>Normally, with an DataReader I would use the .NextResult method, but I'm
    >>trying to avoid the DataReader and just use the DataAdapter's Fill method.
    >>Is this possible?
    >>
    >> Thanks in advance
    >>

    >
    >
     
    Michael C#, May 10, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Kingscott

    Shaping data/multiple result sets - hmmm...

    Mike Kingscott, Aug 27, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    331
    Mike Kingscott
    Aug 27, 2003
  2. randall g
    Replies:
    1
    Views:
    1,824
  3. =?Utf-8?B?UmF2aQ==?=

    DataAdapter - Multiple queries- supported?

    =?Utf-8?B?UmF2aQ==?=, May 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    556
    Ashish M Bhonkiya
    May 19, 2004
  4. Mike
    Replies:
    1
    Views:
    779
    Alexey Smirnov
    Mar 15, 2007
  5. Michael Tan
    Replies:
    32
    Views:
    1,082
    Ara.T.Howard
    Jul 21, 2005
Loading...

Share This Page