As Magoo suggests, if you include the UPDATE and SELECT in a single transation, then only people that did the end-around with things like WITH(NOLOCK) or SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED will be able to read from your table. I don't recall for sure but I believe if you add the hint WITH(TABLOCKX) to the UPDATE, it might prevent that. You'd have to try it to be sure. I'd do it for you but I just don't have the time.
--Jeff Moden
Change is inevitable... Change for the better is not.
Thank You to everyone
I have been working with TabLockX, wrapped in a transaction. And I changed the code to perform everything all together. Seems to do the trick
Thanks again to everyone for all your assistance and suggestions.
Greatly appreciate it
Andrew SQLDBA
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply