Print Page | Close Window

How to set isolation level on queries to read.uncommitted

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=282
Printed Date: 12-Apr-2026 at 10:02pm


Topic: How to set isolation level on queries to read.uncommitted
Posted By: Customer
Subject: How to set isolation level on queries to read.uncommitted
Date Posted: 16-Jul-2007 at 1:49pm
Do you have a sample code showing how to set isolation level to read uncommitted.



Replies:
Posted By: IdeaBlade
Date Posted: 16-Jul-2007 at 2:00pm
I’ve attached the sample code.

 

Here are the key lines:

 

      TimeSpan aTimeSpan = new TimeSpan(0, 0, 50);

      TransactionSettings tSettings = new TransactionSettings(UseDTCOption.True ,

        System.Transactions.IsolationLevel.ReadUncommitted, aTimeSpan);

      QueryStrategy defaultStrategy = new QueryStrategy(FetchStrategy.CacheThenDataSource,

        MergeStrategy.PreserveChanges, tSettings);

 

      PersistenceManager manager = PersistenceManager.DefaultManager;

      manager.DefaultQueryStrategy = defaultStrategy;

 

 




Print Page | Close Window