Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Section 'Locking Data' in the VFP7 Help
Message
 
À
27/08/2002 13:08:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Documentation de produit
Divers
Thread ID:
00693991
Message ID:
00694162
Vues:
17
Jim,

>I would certainly agree with you if I was sure of exactly what a "file lock" is. My GUESS on the subject is that a "file lock" is a totally different mechanism than a record lock and that there is a good likelihood that it is the same mechanism that the operating system (file system) uses across all applications when it wants to prevent access of the file by others.
>Can you please clarify the situation?

A file lock is similar to having a record lock on all the records simultaneously. A file lock prevents any one from getting a file lock or record lock on any record within the table. It does not prevent others from opening the table or reading the data, also one can obtain a file lock even if others have the table open as long as they have no record locks or file lock. Whereas EXSCLUSIVE use prevents anyone from opening the table and is denied if anyone has the table open.

As to the exact mechanism VFP uses to secure these types of locks I don't know the details except that the locks (file and record locks are actually semiphore locks as VFP is locking a location on the disk that is offset from the actual location of the record or file (this offset is one of the reasons for the 2 GB limit on file size). I believe that exclusive use is accomplished by requesting esxclusive access from the OS.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform