Page 1 of 2

transaction.Rollback();

Posted: Thu 21 Mar 2013 17:55
by hepek
transactionRollBack cases Exception

Here is my situation, I have a peace of code like this:

Code: Select all

DB.Connection.Open();
using (DbTransaction transaction = DB.Connection.BeginTransaction()) {
   try {
        ... some code here 
        transaction.Commit();
   } catch (Exception ex) {
        transaction.Rollback();
        throw ex;
   } finally {
        base.DisposeDB();
   }
}
when my command times out I get the "Network error:: A connection attempt failed because the connected party did not properly respond after a period of time ..." error.
so far so good, I get the timeout error as I expected. (I set a timeout in conn string to 30 seconds)

but when the execution reached transaction.Rollback() line that causes another exception because connection is dropped by now. {"Network error: 200"}
so, the line throw ex is never reached

then base.disposeDB fails as well since connection is closed, and I get {"Connection must be opened."} exception.

point is, by the time exception reach my error page I loose the original exception and all I can see is the last one.

how do I get around this issue?
thanks

Re: transaction.Rollback();

Posted: Thu 21 Mar 2013 18:35
by hepek
to be more precise - when DB command times out I want that exception to go to my error page, not some other exception. that way we will know the real source of problem

Re: transaction.Rollback();

Posted: Mon 25 Mar 2013 14:28
by Pinturiccio
We have reproduced the issue. We will investigate it and notify you about the results as soon as possible.

Re: transaction.Rollback();

Posted: Wed 24 Apr 2013 13:59
by hepek
any news on this?

thank you

Re: transaction.Rollback();

Posted: Thu 25 Apr 2013 13:44
by Pinturiccio
We are investigating the issue and will notify you about the results as soon as possible.

Re: transaction.Rollback();

Posted: Tue 04 Jun 2013 19:06
by hepek
any luck on this issue?

it's been a while and there were several dotConnect releases since I reported it.

thanks

Re: transaction.Rollback();

Posted: Wed 05 Jun 2013 13:55
by Pinturiccio
This issue is connected with the implementation of the Timeout property for OracleCommand. Changing the implementation of this property is a resource-demanding process so we cannot tell any timeframe at the moment. We will post here as soon as we get some results.

Re: transaction.Rollback();

Posted: Wed 05 Jun 2013 14:19
by hepek
ok, thank you.

Re: transaction.Rollback();

Posted: Thu 14 Nov 2013 22:02
by hepek
any progress on this issue? I reported it almost 10 months ago.

thanks.

Re: transaction.Rollback();

Posted: Mon 18 Nov 2013 15:22
by Pinturiccio
Changing the implementation of this property is a resource-demanding process. We are investigating the issue and will post here about the results but we can't provide any timeframe at the moment.

Re: transaction.Rollback();

Posted: Mon 18 Nov 2013 15:26
by hepek
yes, I know. that's what you said 6 months ago as well.

thanks

Re: transaction.Rollback();

Posted: Wed 26 Feb 2014 18:13
by hepek
new version 8 is released. is this problem fixed now?
I have version 7.7

thank you.

Re: transaction.Rollback();

Posted: Fri 28 Feb 2014 10:26
by Pinturiccio
Unfortunately we did not fix the issue and can't provide any timeframe when it would be fixed. We will post here when the build of dotConnect for Oracle with fix of the issue is available for download.

Re: transaction.Rollback();

Posted: Mon 07 Apr 2014 16:57
by hepek
this was reported one year ago, and you were able to reproduce it.
you said it will be fixed in u future releases.

one year passed and it is still not fixed. you did have a bunch of releases in a meantime.

this is serious issue because transaction fails to rollback.

Re: transaction.Rollback();

Posted: Tue 08 Apr 2014 12:19
by Pinturiccio
We are investigating the issue and will post here about the results in the nearest future.