Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locking a table row for one user
Message
De
28/08/2015 13:14:51
 
 
À
28/08/2015 05:13:03
Rob Clapworthy
Bespoke Software Systems
Royaume Uni
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2014
Application:
Web
Divers
Thread ID:
01623931
Message ID:
01623950
Vues:
53
>Any help extremely appreciated

Rob, sorry to jump in, but I have a question. Have you looked at the isolation level REPEATABLE READ?

Just wondering if that would accomplish the same thing. You can set the isolation level for the transaction to REPEATABLE READ. If the first SELECT is successful, then you should be able to issue the subsequent UPDATE statement in the transaction.

Also...you'll want to wrap this inside a TRY/CATCH block, in case you can't get a lock on the SELECT.

Not saying your initial code won't work (maybe a second question, if it's not working for you, what behavior were you getting?). Just curious if you had looked at the REPEATABLE READ isolation level.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform