From: Andrew G. <ag...@jc...> - 2004-02-04 15:08:31
|
> Why would database workbench and ibconsole run the query, but through > asp.net it hangs? Ok I asked Database Workbench support what isolation level they use, and they said: "read committed", with "no wait" for deadlocks. However I could not find this as a valid option on System.Data.Isolation http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/ frlrfsystemdataisolationlevelclasstopic.asp Readuncommited is the option that will allow dirty reads and prevent deadlocking. So I used: myTxn = myConnection.BeginTransaction(IsolationLevel.Readuncommitted) And it works fine now - no hanging :) My next question is: In my asp.net page I want to pull up a single record but want to check to see if someone else Has this record uncommited first. If I use IsolationLevel.Readcommitted the webpage will hang if the record is locked, If I use IsolationLevel.Readuncommitted the page will load but the data will be ditry. How can I check, or what is the best method to see if a record has a lock? TIA Regards, Andrew C. Goodall |