List Info

Thread: Re: MARS (Multiple Active ResultSets) and Transactions




Re: MARS (Multiple Active ResultSets) and Transactions
country flaguser name
France
2007-05-28 04:00:12
Hi Ananth,
could you post the snipet of code concerned?

Ananth Rajarman - Clue Design <ananthcluedesign.com.au> wrote:
Hi,
 
I have a transaction being executed on my Data Access on Layer, with multiple updates (5). When MARS was turned off on execution of the Transaction, I got an error “ Open DataReader Associated, Command must be Closed”. So I turned on MARS, and then on SqlMapper().CommitTransaction() it throws the error “Pending requests working on this Tranasaction”.  I used sqlMapper().BeginTransaction() to begin the transaction
 
Has anybody encountered this problem before and solved it?
 
Regards
 
Ananth
 


Got a little couch potato?
Check out fun summer activities for kids.
RE: MARS (Multiple Active ResultSets) and Transactions
country flaguser name
Australia
2007-05-28 05:35:44

Hi,

 

I did manage to fix the problem myself.

 

SqlMapper.ExecuteQueryForObject<T> wasn’t closing the DataReader. I changed the code so its closes the DataReader after fetching data and now it seems to work fine even with MARS turned off.

 

Thanks anyways.

 

Regards

Ananth

 


From: Prosper [mailto:mprospayahoo.com]
Sent: Monday, 28 May 2007 5:00 PM
To: user-csibatis.apache.org
Subject: Re: MARS (Multiple Active ResultSets) and Transactions

 

Hi Ananth,

could you post the snipet of code concerned?

Ananth Rajarman - Clue Design <ananthcluedesign.com.au> wrote:

Hi,

 

I have a transaction being executed on my Data Access on Layer, with multiple updates (5). When MARS was turned off on execution of the Transaction, I got an error “ Open DataReader Associated, Command must be ClosedR21;. So I turned on MARS, and then on SqlMapper().CommitTransaction() it throws the error “Pending requests working on this Tranasaction”.  I used sqlMapper().BeginTransaction() to begin the transaction

 

Has anybody encountered this problem before and solved it?

 

Regards

 

Ananth

 

 

 


Got a little couch potato?
Check out fun summer activities for kids.

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )