Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help within a multi-user environment...

Status
Not open for further replies.

rfrazier

MIS
Feb 14, 2006
1
US
In a multi-user environment is there a way to find out who is using the database?

In a LAN there could be 20 computers. Each one has access to a VFP db on the server. A simple login is used with users names in a local public variable, so that the name can be tagged to reports. For nightly processing, I'd like to be able to locate and/or disconnect a user from the server and log them from foxpro if needed. Thanks.
 
There are various API calls you can use to list connections and even clear them if needed, but there are no native VFP functions to do it.
If you're using a Windows server, you may want to take a look at a utility I put together for just that purpose.
Follow the link in my signature, and scroll down until you find the "Open File Lister".
Feel free to download it and give it a try.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
I use the opposite approach and I've built a shutdown manager into the app so that every running instance it will shut itself down on command.

A timer reads a file named ShutDown.txt on the server every minute or so. If it sees "WARN" then it tells the user to log out immediately. If it sees "STOP" then it says "Shutting down in 10 seconds", counts down to zero and shuts down the app. The same mechanism prevents any user logging back in until ShutDown.txt says "RUN".


Geoff Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top