Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to lock records in SQL Server
Message
De
02/04/2003 10:04:20
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00772304
Message ID:
00772936
Vues:
15
>A similar idea came to me before reading your message. Only i would use only one datetime column which would register the time the user1 began editing. If another user - user2 sees that more that 10 mins passed between the datetime and the now then it means that user1 did not complete editing. The user interface is equipped with the 10 min expiration timer.
>Your method adds a conveniance of knowing who was the last user with intention to edit/add a record.

Not technically correct and here's why.

If the user one did not finish in time to save within the 10 minutes, and no one else picked the record over after the 10 minutes expiration, how would you be able to know if you allow or not to that specific user to save? Basically, user one took longer than exepected to do the change, no one else picked the record pass the 10 minute mark, so user one should still be able to save as you can rely on the member ID to determine that he was in fact the one who initiated the update. Otherwise, if you rely only on the datetime field, once the 10 minute mark is reached, you have no mechanism of being able to allow the first user to proceed with the save, even after the 10 minute mark, if no one else grab the record for update.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform