I have a transaction in dotNet 2.0:
-------------
TransactionOptions options = new TransactionOptions();
options.IsolationLevel = System.Transactions.IsolationLevel.Serializable;
options.Timeout = new TimeSpan(3, 0, 0); //maximum 3 hour transaction
using (TransactionScope transactionScope = new
TransactionScope(TransactionScopeOption.Required, options))
{
....
}
-------------
When it runs I have a sql query that fails some times, but I catch the
exception and correct the problem. When I continue I get the error
"the operation is not valid for the state of the transaction." so the
transaction has failed because the sql query failed.
How can I get the transaction to ignore the error and continue running?
Do I have to write code that never throws an SQL exception?
Kind Regards,
Allan Ebdrup