A
Allan Ebdrup
I've implemented transactions in my dotNet 2.0 project using
System.Transactions and TransactionScope.
---
TransactionOptions options = new TransactionOptions();
options.IsolationLevel = System.Transactions.IsolationLevel.Serializable;
options.Timeout = new TimeSpan(0, 5, 0);
using (TransactionScope transactionScope = new
TransactionScope(TransactionScopeOption.Required, options))
{
DoWork();
transactionScope.Complete(); //Tell the transaction to commit
}
---
When I debug this code and stop debugging inside the DoWork after it has
inserted some rows in some tables but before the transaction has completed,
selection database queries to the tables updated time out, (other users can
still run selects against the database). The selects run fine again when I
run the transaction to completion.
Is this because of my IsolationLevel.Serializable? And how do I avoid this
locking?
Is there some online documentation of isolation levels, that explains them
thoroughly?
Kind Regards,
Allan Ebdrup
System.Transactions and TransactionScope.
---
TransactionOptions options = new TransactionOptions();
options.IsolationLevel = System.Transactions.IsolationLevel.Serializable;
options.Timeout = new TimeSpan(0, 5, 0);
using (TransactionScope transactionScope = new
TransactionScope(TransactionScopeOption.Required, options))
{
DoWork();
transactionScope.Complete(); //Tell the transaction to commit
}
---
When I debug this code and stop debugging inside the DoWork after it has
inserted some rows in some tables but before the transaction has completed,
selection database queries to the tables updated time out, (other users can
still run selects against the database). The selects run fine again when I
run the transaction to completion.
Is this because of my IsolationLevel.Serializable? And how do I avoid this
locking?
Is there some online documentation of isolation levels, that explains them
thoroughly?
Kind Regards,
Allan Ebdrup