Question:
Can we connect two datareader to same data source using single connection at same time?
Answer:
Yes, you can connect two datareader to the same datasource, but one mainthing is close the first datareader before using second one then only it's possible. Source: CoolInterview.com
The point is, we can have any number of datareaders to the same datasource, but only one of them could have an active connection at any point of time. Source: CoolInterview.com
Answered by: Sathishkumar | Date: 7/6/2009
| Contact Sathishkumar
It is possible using MARS (Multi Active Record Set) in VS 2005. We have to set MARS =True in the connection string, so that we can use 2 datareaders for a single connection Source: CoolInterview.com
Answered by: Madhusudhanreddy | Date: 7/24/2009
| Contact Madhusudhanreddy
Yes.It is possible to use two datareaders at same time by using [MultipleActiveResultSets=true] in connecting string Source: CoolInterview.com
Answered by: R@J | Date: 3/24/2010
| Contact R@J
yes ,you can use two datreader at a time in a single connection if you do the property of mars(multi active record set) is true. Source: CoolInterview.com
Answered by: sunil | Date: 4/7/2010
| Contact sunil
yes,we can connect two data readers.but at a same time not possible. example to connect datareader to connect oracle database:- oleDbConnection cn=new oleDbConnection("user id=scott;password=tiger;provider=msadaora.1"); Source: CoolInterview.com
Answered by: Geetha | Date: 4/11/2010
| Contact Geetha
Yes,we can use two datareader multiple datareader at the same using MARS(MultipleActiveResult Set) in the connection string set MultipleActiveResultSet=True in the connectionstring Source: CoolInterview.com
Answered by: praseetha sandeep | Date: 4/22/2010
| Contact praseetha sandeep
Yes,we can.
Regards, Nicku Source: CoolInterview.com
Answered by: nicku | Date: 8/11/2010
| Contact nicku
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|