开发者

Lock at the time of Inserting record

I have windows service have two method which are inserting data to the same table at the same time.but at the time of insert it threw the exception.how i can make lock on such situation.

t开发者_如何学Chank you in advance


if its update statement, i would suggest BEGIN TRANSACTION with READ COMMIITED isolation level. but since its insert, u might want to create extra table act like a queue. Insert everything in new table and after that u can run your validation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜