Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the fastest way to check the lock status of a fi
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Web
Miscellaneous
Thread ID:
01620236
Message ID:
01620238
Views:
81
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform