Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why no Directory() like File()?
Message
From
10/12/1999 15:33:06
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvania, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00301679
Message ID:
00301975
Views:
34
>Again, even if VFP had this it would not preclude the error checking required on USE EXCLUSIVE. It's the same with locks, the only way to know for sure if you can get a lock is to get it. Anything else simply gives you historical infromation, "If you had tried to lock now you would have succeeded. Disclaimer: this information says nothing about any future attempts to lock."

Understood. Though maybe we could compromise with an ExclusiveUse() function that returns .T. (and "uses file excl") if excl is granted or .F. for any other reason.

If !ExclusiveUse("File")
Use File shared
Else

Use File shared
Endif

I have a shared-access queue of 'currently waiting' items. I used a !deleted() filter, then simply delete the record after the job is processed. It'll drop from the index, and the grid-view (upon refresh) It is acceptable to have even 500 records deleted and 2 waiting because only 20-50 records come in per day. At some point (in the mornings) someone is going to run the app when noone else does. When this happens the environment setup code can grab and pack the file, just for housecleaning's sake, then return the file to shared use.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform