Aquiring Serveral Result Sets from a Query

  • Thread starter Thread starter A
  • Start date Start date
A

A

Hi, All!

I'm creating a program that executes a stored procedure from a SQL Server
database. This stored procedures produces multiple result sets, in which one
of these result sets are going to be used in the program.

This is my question... Should I use a Data Reader to read these result sets
or a dataset?

Thanks!

--A
 
Hi A,

I'm far from being an expert on databases but...
That probably depends on your needs and the amount of data you are reading. Assuming you mean using a dataset filled using a DataAdapter, then there are limitations, you get all data in one go and need to hold all the data. Using a DataReader you can step through the results in turn, but it keeps a busy database connection while you are doing so.
 
Back
Top