Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Semaphore lock?
Message
 
 
À
09/03/2018 11:40:40
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Titre:
Divers
Thread ID:
01658623
Message ID:
01658650
Vues:
34
>>I am working on implementing a semaphore locking so that the same record (in VFP 9 application with SQL Server) cannot be edited at the same time by more than one user. I think I have a draft design using a .DBF table for semaphore locking. The nice thing about a DBF table is when a user locks a record and then closes the application, the record will be automatically un-locked (I think after some set time).
>>
>>Is there a feature in SQL Server where the same can be done? That is, if I create a table in the SQL Server for "locking" or indicating that a user is working on this or that order, can the record/row be automatically un-locked if user closes the app?
>
>I always rely on my own implementation for semaphore locking. This is also because each corporate environment may have their own perspective on how this should be done. For example, no matter what, a requirement may state that a user should not hold a record for more than 5 minutes. Basically, when the user can access a record for editing, we allow a granted period, such as 5 minutes. The record then has a field to identify the user who has ownership to the record, the time it started. Then, as other users try to get a hold of that record during that timeframe, they may even be notified who has it. Then, after 5 minutes, if the user did not save, and another user tries to edit, he may then take ownership of the record. Then, if the first user tries to save at 6th minute, for example, he will be notified that his timeframe to save has expired.

Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform