[RESOLVED] [02/03] 2 DataReader objects in succession
i require to connect 2 DataReader objects in succession to the same connection object .
but its not allowing me to do so.
error generated is :
"There is already an open DataReader associated with this Connection which must be closed first"
instead of using DataReader , if i use DataAdapter object , it works .
what is the correct and efficient way to read through records ?
Re: [02/03] 2 DataReader objects in succession
You cannot have two Datreaders open on the same connection. You either have to use two different connections or change to DataSets.
Re: [02/03] 2 DataReader objects in succession
Quote:
Originally Posted by Shuja Ali
You cannot have two Datreaders open on the same connection. You either have to use two different connections or change to DataSets.
can dataset be ceated from Datreader object ?
or DataAdapter is the only way
Thanks.
Re: [02/03] 2 DataReader objects in succession
DataAdapter is the only way to create the DataSet. You cannot create a DataSet from a DataReader.
alhtough the above is not entirely correct, however the process of creating a DataSet from a datareader would be more cumbersome than using a DataAdapter.
Re: [RESOLVED] [02/03] 2 DataReader objects in succession
More pointless than cumbersome.