` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: MS SQL record locking
2013-01-07 -- Duppie
 
n MS SQL you need to do something like this. Wrapping your SELECT in a transaction while using WITH (XLOCK,READPAST) locking hint will get the results you want. Just make sure those other concurrent reads are NOT using WITH (NOLOCK). READPAST allows other sessions to perform the same SELECT but on other rows. BEGIN TRAN SELECT * FROM WITH (XLOCK,READPAST) WHERE RowId = @SomeId -- Do SOMETHING UPDATE SET =@somevalue WHERE RowId=@SomeId COMMIT


Today is December 3, 2024, 11:27 am
This article has been viewed 35262 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: