System.Transactions

Posts   
1  /  2
 
    
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39615
Joined: 17-Aug-2003
# Posted on: 08-May-2007 09:18:55   

Looking at your testcode.... I don't see what it SHOULD do that it doesn't... I see code which edits an entity and then commits the transaction. That doesn't happen?

You edit an entity's field. That ONLY breaks the transaction if that throws an exception. does it throw that exception or not? If it doesn't throw an exception the code of course ends up at the Commit call.

I also don't see any save actions in your code. You start a transaction on an Adapter object, but it's not used in any call after the transaction start till the Commit happens. Normal ado.net transactions aren't global per thread, you actually have to use the adapter object which has the transaction to perform db access so that access takes place inside the transaction.

(I'd also appreciate it if you open a new thread next time instead of hijacking this old thread. )

(thread is continued here: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=9871 )

Frans Bouma | Lead developer LLBLGen Pro
1  /  2