DataReader questions

N

Norton

Can a DataReader contain multiple result sets? I know a dataset can but I
haven't seen the same statements regarding a DataReader?

Also, how do you loop through multiple tables in a result set, whether its a
dataset or data reader?

Thanks!

Norton
 
J

Jon Skeet [C# MVP]

Norton said:
Can a DataReader contain multiple result sets?
Yes.

I know a dataset can but I
haven't seen the same statements regarding a DataReader?

Also, how do you loop through multiple tables in a result set, whether its a
dataset or data reader?

In a DataSet, use DataSet.Tables, which is a collection of the tables
in the DataSet.

For DataReader, use NextResult().
 

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

Top