DataAdapter and multiple result sets

M

Michael C#

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
 
Y

Yunus Emre ALPÖZEN [MCAD.NET]

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

Michael C#

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!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top