锁定更新 [英] locking on updation
问题描述
大家好,
我需要你们所有帮助代码项目的帮助,
我需要为我的应用程序应用锁定的概念,所以大家告诉我如何实现它。
我这样的问题...
我在更新时应用锁定/编辑所以没有其他用户更新记录,直到user1没有成功完成更新。所以我可以应用这个概念。
i需要阻止用户从另一个用户选择已经更新的值时从gridview中选择值,所以我想阻止其他用户,直到用户成功更新值。
Hello all,
I need some help from all of you helper of code project,
I need to apply concept of locking for my application, so guys tell me how to implement it.
my problem like that ...
I am apply locking on update/Edit so no other user update record until updation is not successfully done by user1 . so i can apply this concept.
i need to stop user to select value from gridview when already value is selected by another user for update ,so i want to prevent other user until value is updated by the user successfully.
推荐答案
read 在.NET中做出锁定的6种方式(悲观和乐观) [ ^ ]
在网格视图上工作,你可以使用交易在你的后端sql。有关sql sevrer中事务的更多信息,请参阅
SQL Server事务和错误处理 [ ^ ]
Insted of working on gridview you can use transaction in your back end sql . For more info on transaction in sql sevrer please refer
SQL Server Transactions and Error Handling[^]
这篇关于锁定更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!