如何使用ADO.net在SQL Server中实现悲观的行锁定 [英] How pessimistic row locking can be achieved in sql server using ADO.net
本文介绍了如何使用ADO.net在SQL Server中实现悲观的行锁定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的表中有序列"列.它是多用户应用程序.我想使用排他锁使用行锁定,以便其他用户在一个用户使用时无法读取/写入特定行.我正在使用ADO.net作为数据访问层.
谁能告诉我实现悲观锁定的方法.
Hi,
I have ''sequence'' column in my table. And it is multiuser application. I want to use row locking using exclusive lock so that other users cannot read/write the particular row when one user is using. I am using ADO.net as data access layer.
Can anybody tell me the ways to implement pessimistic locking.
推荐答案
refer
http://www.techrepublic.com/article/pessimistic-locking-solves- adonet-concurrency-problems/1049842 [ ^ ]
在.NET中进行锁定的6种方法(悲观和乐观) [
refer
http://www.techrepublic.com/article/pessimistic-locking-solves-adonet-concurrency-problems/1049842[^]
6 ways of doing locking in .NET (Pessimistic and optimistic)[^]
这篇关于如何使用ADO.net在SQL Server中实现悲观的行锁定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文