Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Questions about record locking
Message
De
16/02/2002 12:38:17
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
16/02/2002 11:01:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00621109
Message ID:
00621144
Vues:
11
>>1) If a user locks a record, and the computer hangs - will the lock be released automatically?
>>
>>2) The first question, of course, reveals my lack of knowledge about what "really happens" when I lock a record. If anybody can illuminate me on this point... Are OS-functions called up? Is a bit changed in the memory on the file server?
>>
>>TIA, Hilmar.
>
>Hilmar,
>
>A lock is held in memory, ie the os keeps a list of the locks.
>
>If your computer hangs, you will either shut it down or reboot. Since the locks are in memory, they are released
>
>Above extended to file servers
>
>on your pc you lock a record. The lock is held in your pc's memory and also transferred to the server.
>If you try to lock a record, the pc first looks whether it is already locked on your pc. If not, your pc communicates with the server to place a lock. If successful, the lock will reside in your pc as well as the server.
>
>Now, if your pc has successfully placed a lock (on the server) and it reboots, there will still be a lock on the server. Some (most of, I think) servers detect that the pc is no longer there and release the lock. Others keep the lock for minutes and time out (release the lock) eventually
>
>This is by no means complete, but it gives an idea

Thanks, that's what I wanted to know.

I was thinking to use some scheme to limit the number of users connected simultaneously (example: limit to 5 users). Locking 5 consecutive records in a table seems safer than saving information to a table. For, if the user's computer hangs, he will remain "logged in", if I use a REPLACE scheme.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform