Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Used() statement
Message
From
07/05/1997 12:12:42
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00031069
Message ID:
00031158
Views:
41
>>>Does this statment not work if you specify a drive letter? I keep getting a .f. response when issuing a
>>> ~~ ?used("K:ledger") ~~ and I KNOW the file is in use!
>>>Thank you
>>
>>You don't have to put the drive leader. Just put the alias.
>
>Sorry, I should have been a little more specific. I want to know if another user on the network has this file open.

USED() checks to see if you (the individual user) have a given alias (not disk file) open in one of your work areas. It does not check for open files on a drive or network.

There are two ways to do what you want. Honestly, the prefered way is to use a third-party package like NetLib - it's the most straightforward way to deal with the problem. Another Thread member gave a solution using low level file functions, but this is not so straightforward, in my opinion, and I suspect may only indicate whether a file is opened exclusively.
David M. Stowell
Ravenslake Consulting
Chicago, Illinois

e-mail: davidstowell@ravenslakeconsulting.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform