Ok, I'm new to .NET so I'm afraid I'm doing something stupidhere, but I'm trying to populate a DataSet manually from aDataReader, and its turning out to be ridiculously difficult.
Yes, I could use a DataAdapter to more easily load the DataSet,but that would entail loading a couple of gigs worth of datainto memory at once, which is bound to be bad. So I'm trying touse a DataReader to collect a group of rows, one row at a time,until I have a group which I can process. Then I perform mycalculations, store my results, clear the DataSet, and startcollecting from the DataReader again. But there doesn't seem tobe an easy way to get a row's worth of results from a DataReaderand insert them in a DataSet (that I can find, anyways.) I cameup with a convoluted set of actions involvingDataReader.GetSqlValues and DataRow.ItemValues, but as itdoesn't work I won't bore you with the details. (It doesn'tknow how to convert the elements of the generic object array tothe appropriate types for the DataRow.)
Anybody know how to get a row out of DataReader and into aDataSet?
- rob.
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>FoldYBbDek+OAbPvHqeVvg==</Id>