Hi everyone: I have a method that executes a batch of stored procedures wrapped in an ADO.NET transaction.
Naturally I rollback the transaction if an exception occurs. However, an exception can occur in the catch block if a transaction rollback has already occurred in the database. (in this case, the origin is a trigger that raises an error and rolls back the transaction in certain circumstances). This makes sense to me as the code is trying to rollback a transaction that has already been rolled back. Is it possible to determine the state of the transaction from code? In my exception code I would like to check if there is an open transaction before attempting to do a rollback. thanks, Greg You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.