Hasan Shouman Hasan Shouman - 27 days ago 5
SQL Question

Transaction Scope Locks table

I am using C# 3.5 and I have a code within transaction scope that is locking the tables , how can I prevent the transaction scope from locking these tables ?

Thanks,

Answer

You should use keywords to prevent table locking, such as nolock, but pay attention how you read them, for example read committed or read uncommited, as this may leave you with the so called, dirty reads.