The following pattern is quite common in database programming: IF EXISTS(some query) BEGIN DO SOMETHING; END When such code runs in high concurrency situations, it may not work as expected. I will provide a repro when such logic fails 40% of the time. The following script provides a test table and attempts to implement optimistic locking using rowversion columns: CREATE TABLE dbo . TwoINTs ( ID INT NOT NULL, i1 INT NOT NULL, i2 INT NOT NULL, version ROWVERSION ) GO SET NOCOUNT ON ; DECLARE @i INT...(read more)
Source Click Here.
A
New
Internet
Library: Add Your Website/Blog
or Suggest A Website/Blog to our Free Web Directory
http://anil.myfunda.net.
Its very simple, free and SEO Friendly. Submit Now....
Its very simple, free and SEO Friendly. Submit Now....
Subscribe to:
Post Comments (Atom)


Post a Comment