Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
And another one...
Message
From
21/04/2000 08:22:37
 
 
To
21/04/2000 04:13:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00362153
Message ID:
00362182
Views:
22
>can i know if there is any user on the network accessing files of the database ? Some Command like aused() i mean but not related on one's datasession.
>thanks again
>Alessio

You can use ADSI to do this, but rights issues can make it impractical to run on a client workstation, because you need admin rights on the machine that hosts the files to view usage info. The ADSI components install with Windows 2000, but are available for download from MS and install on most other Windows OSs.

lcComputer = "MYSERVER"
oFileService = GETOBJECT("WinNT://" + lcComputer + "/lanmanserver")
FOR EACH oFileShare IN oFileService.Resources
?oFileShare.Name
?oFileShare.User
?oFileShare.Path
?oFileShare.LockCount
ENDFOR

This will list all open files on the machine specified. You can use the Path property of the share object to narrow the results down to the file you are looking for.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform