I begin a transaction with SqlConnection.BeginTransaction()
and I do a DELETE
and some INSERT
s. There is any configuration I can do on the isolation level to allow any query to read the data on a "dirty way" during the transaction?
Basically I want to prevent locks while I update the data. The problem is; I can't control the SELECT
s. If I define a ReadUncommited
isolation level on my transaction will the external querys have rights to read the data without waiting or is required to define it on this querys?
For example:
try
{
connection.Open();
transaction=connection.BeginTransaction(IsolationLevel.ReadUncommited);
// DELETE
foreach (int i in fibarray)
{
// INSERTS
}
transaction.Commit();
}
catch (Exception ex)
{
if (transaction.Connection != null)
transaction.Rollback();
}
Meanwhile, the SELECTS
on another machine I have not the access.