Dears, i have a exception logger and i need to save exceptions in database with datetime, but it is not saving. i am calling a function is my catch block to insert a record in exceptions table , but when i do so it gives me the actual exception occured and does not saves the exception in database. it seems issue with transaction handling, i openeed a new transaction but still the same. pls help. Thanks han Updated at 31.07.2010 9:07:59Dear Alex, sorry but how should i do this in different session/transaction. i am doing something like this : using (var session = Session.Open(DomainBuilder.Domain)){} but still the same error..pls give some sample code to how to forcely open a new session /transaction..its over a month i am testing DO but unfortunately could not get hold of these basics...i want to understand these concepts completely especially Session and Transactions...becuase we will be heavily dependant on this. i understnad that session is equivalent to db connection, but how to open /close new session/transaction or use existing session/ transaction. pls suggest.i cant move ahead if these concepts are not clear. thanks HAN This thread was imported from our support forum. The original discussion may contain more detailed answer. |
You should do this in different Session and transaction: normally original transaction is already rolled back at this point, and thus Session where this happened is unusable until the outermost Transaction.Open block (i.e. outermost transaction scope for this Session) won't be left. |