0

I know I cannot iterate IDataReader to the end and go back to the beginning and iterate it again. So what should I do in order to iterate the data many times?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Arif Yilmaz
  • 121
  • 2
  • 4
  • 14
  • 3
    Instances of IDataReader are forward-only, read-only, single-shot access to data. You need to use a DataSet filled by a DataAdapter. – Matt Feb 09 '13 at 08:15

1 Answers1

0

Depends on a number of factors. You could close and reopen the DataReader, use a dataadapter to read it into a dataset, or create your own collection, read it into that and process off the collection.

Robert McKee
  • 21,305
  • 1
  • 43
  • 57