New Posts New Posts RSS Feed: How to set isolation level on queries to read.uncommitted
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

How to set isolation level on queries to read.uncommitted

 Post Reply Post Reply
Author
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Topic: How to set isolation level on queries to read.uncommitted
    Posted: 16-Jul-2007 at 1:49pm
Do you have a sample code showing how to set isolation level to read uncommitted.
Back to Top
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post 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;

 

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down