Apparently yes. This is how SqlInternalTransaction's Dispose method (which SqlTransaction's Dispose calls) looks like from Reflector: private void Dispose(bool disposing) { Bid. PoolerTrace(" %d#, Disposing\n", this.
ObjectID); if (disposing && (this. _innerConnection! = null)) { this.
_disposing = true; this.Rollback(); // there you go } }.
It will, I even tested this once by explicitly throwing an exception. – Pawel Krakowiak Mar 13 '09 at 8:01 That's awesome! One question on my mind now though is do I need to explicitly call commit...or will the using statement handle that one too effectively making my current commit statement redundant.
– mezoid Mar 13 '09 at 8:27 That is awesome, but does it work for other implementations of IDbTransaction if you're using it for cross-db compatibility? – Matt Hamilton Mar 13 '09 at 8:35 1 @mezoid: Commit will never happen automatically. @matt: They should, by design.
– ssg Mar 13 '09 at 10:14.
Yes, the using will call Dispose on exit, which will call Rollback, not Commit. – awe May 10 at 11:39.
I believe that if there's an exception such that Commit() was never called, then the transaction will automatically rollback.
Apparently yes. This is how SqlInternalTransaction's Dispose method (which SqlTransaction's Dispose calls) looks like from Reflector.
You have to call commit. The using statement will not commit anything for you.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.