多个用户Sql同时更新 [英] Multiple User Sql Update at same time

查看:86
本文介绍了多个用户Sql同时更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有sql数据库的Web应用程序,可供很多用户同时使用。如果一个表同时被多个用户更新会发生什么。

解决方案

查看这篇文章

6种在.NET中进行锁定的方式(悲观和乐观) [< a href =http://www.codeproject.com/Articles/114262/ways-of-doing-locking-in-NET-Pessimistic-and-opttarget =_ blanktitle =New Window> ^ ]


在你的存储过程中使用事务,



参考这个网址,



http://technet.microsoft.com/en-us/library/ ms188929.aspx [ ^ ]

I have a web application with sql database to be used by a lot of users at the same time. What happens if a table is updated by multiple users at the same time.

解决方案

Check this article
6 ways of doing locking in .NET (Pessimistic and optimistic)[^]


use transaction in your stored procedure,

Ref this url,

http://technet.microsoft.com/en-us/library/ms188929.aspx[^]


这篇关于多个用户Sql同时更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆