Datareader

skypharm

New Member
Hello, <BR>I'm working with ADO.NET and I make a request that save the result into a DataReader's object. I need to cross the result of this request twice; how can I return to the beginning of the DataReader after I read it the first time?. <BR>(is the same that the MoveFirst method of recordset in ADO). <BR>Thank you, <BR><BR>VanesaNot with a DataReader, at least. A DataReader is akin to a forward-only, read-only Recordset, in classic ADO speak. There simplest option is to use a DataSet, which allows forward/backward movement through the records it contains. Another option is to just copy the contents of the DataReader to an array, and then iterate through the array twice.<BR><BR>hth"Another option is to just copy the contents of the DataReader to an array, and then iterate through the array twice." - is that similar to the GetRows method? What about closing the Reader and then Opening it fresh again? (just wondering...not..that.. I'd ever ... actually DO that, heh, hrm hum, I wasn't here) ;)
 
Back
Top