Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
samamun001
Starting Member
17 Posts |
Posted - 2004-10-13 : 02:14:31
|
| I have two asp form one has sql query "BEGIN TRAN select * from Campuses with (HOLDLOCK,ROWLOCK) where CampusID=24 update Campuses set CampusName='Dl' where CampusID=24 COMMIT TRAN"The other form has the query to select the same row.Whenever i run both the forms the 2nd form select the locked row which shouldn't be selectedsamamun |
|
|
sify
Starting Member
18 Posts |
Posted - 2004-10-13 : 02:29:07
|
| It also depends on the tranasaction isolation level. If the transaction isolation level is set to Read Uncommitted then the other transaction will be able to read the rows.Instead go for higer transaction isolation level like read committed or repeatable read. But since urs is an web envoirment I would prefer to stay at lowest lock level to enable better concurrecy. |
 |
|
|
|
|
|