Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the fastest way to check the lock status of a fi
Message
 
À
27/05/2015 08:23:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Web
Divers
Thread ID:
01620236
Message ID:
01620238
Vues:
82
>Hi all,
>
>What is the fastest way to check the lock status of a file?
>
>I used records in a certain table to check who's using the application. Now I use dummy files for that purpose. When checking I first TRY to DELETE the lockfile. If the file still exists afterwards, then the user is still using the application. DELETE is quite fast, but I'm wondering whether there's another even faster way to check it.

Not sure if this is faster:
lnHandle = FOPEN(full_path,12)
IF lnHandle < 0
   *** Somebody use the file
ELSE
   FCLOSE(lnHandle)
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform