|
-
May 29th, 2007, 05:29 AM
#1
Thread Starter
Fanatic Member
[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 ?
-
May 29th, 2007, 05:41 AM
#2
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.
Use [code] source code here[/code] tags when you post source code.
My Articles
-
May 29th, 2007, 05:45 AM
#3
Thread Starter
Fanatic Member
Re: [02/03] 2 DataReader objects in succession
 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.
-
May 29th, 2007, 09:36 AM
#4
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.
Use [code] source code here[/code] tags when you post source code.
My Articles
-
May 30th, 2007, 10:34 AM
#5
Re: [RESOLVED] [02/03] 2 DataReader objects in succession
More pointless than cumbersome.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|