views:

2172

answers:

2

I am working on a DAL that is getting a DataReader Asynchronously.

I would like to write a single method for transforming the DataReader into a DataSet. It needs to handle different schema so that this one method will handle all of my fetch needs.

P.S. I am populating the SQLDataReader Asynchronously, please don't give answers that are getting rid of the DataReader.

A: 

Here's some good info:

Code: Convert DataReader to DataSet

Phaedrus
+2  A: 

Try DataSet.Load(). It has several overloads taking an IDataReader.

Matt Hamilton
Ended up using a DataTable (which has the same method)
Harry