|Re: Re: [firebird-support] Deadlock
This discussion has migrated to slightly off topic where I should be taking it up in Firebird-tools. But to close the discussion, here is how I resolved it. If the choices I've made are not the best, please criticize.
in the C# method that calls FbCommand, I added an optional parameter, IsolationLevel and set the default to IsolationLevel.Snapshot. ( I think this provides the most optimistic environment and in the calling procedures where I need more isolation, I can always override it)
I start the transaction with this isolation level,
Then I have a try/catch block where the FbCommand executes the procedure, If an exception is thrown, it rolls the transaction back, otherwise it commits.
Also, both the FbTransaction and FbCommand are in C# using clause