Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to lock records in SQL Server
Message
 
 
À
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:
00773422
Vues:
12
>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.

Hmm, i guess we are entering a twilight zone here.
Your procedure is good when there is little chance of 2 users trying to edit the same record at the same time. When this happens often the following situation can take place:
The user1 starts editing.
10 mins passes while user1 drinks coffee and edits a record letter by letter.
User2 checks the record and sees that more than 10 mins passed and grabs the record.
User1 tries to save the fruit of his/her labour, looks bluntly at the "Another user just grabbed your record" message and spills the coffee all over the desk in rage.

I would add a timer to the form warning the user1:
"You have 3 mins to complete the form"
Regards.
Kamil
A moment of silence is our cosmic reset button.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform