Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Lock a Sql server record
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
How to Lock a Sql server record
Divers
Thread ID:
01214142
Message ID:
01214142
Vues:
58
Hi.
I'm looking for an RLOCK() equivalent in C#/Sql Server
Situation is as follows:
Web Form, Lots of uers, Single Table
Any user can highlight any record and amend it.
Uses Disconnected Record, User Views, It , Possibly Amends it, and saves It
If another User has the Record, I want a visual clue on the form, and an indication that it it is read Only.
In VFP . I would do something like:
If Rlock()
messageBox('You can only View')
Endif

I realise one could use Optimistic Concncurrency, but the user will not know about this until he has spent a lot of time amneding say 20 fields, to find out (at the end ) that a different user is also amending
The user needs to know when they FIRST view the record that somebody else is using the record. Also, the user saving the record will need an Unlock facility

I presume that are ways of handling this scenario in a Disconnected fashion, in Sql Server,but I dont have any such experience of this, hence the question.

Regards,
Gerard
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform