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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Who else in the system

Status
Not open for further replies.

FoxWing

Programmer
Dec 20, 2004
44
GB
Just curious is there a way "in foxpro" to know who else login my database application beside myself ? I'm using Vfp 8 with foxpro database.

All i can think of now is usinf a free table, u_trace(usr_id,loginCnt). Everytime user login, update it based of the userid and +1 for login_cnt.

If user logout, update the login_cnt to -1.


eg:

usr_id, loginCnt
MIKE 1
JAMES 2


Will this approach work ?
 

That is the way I would handle it.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
To manually track users, yours is one way. Maintain a list of who's on, username, station and so on. A problem arises when you have an abnormal termination, power failuer or whatever, the table may not get updated.

Also, I have a utility I wrote to check for open files on a Windows server. Feel free to download it and try it out.
Follow the link by my signature and scroll down until you find 'Open File Lister'.
It can show everyone using any of your files by server, file name, username and so on. It can also clear connections if needed.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Hi FoxWing,

due to the abnormal terminations Dave mentioned: let each user RLOCK() their own record. That lock will be unlocked even at abnormal termination, giving you a very good hint on whos "online".

Bye, Olaf.
 
RLOCKing can have adverse problems. If you do an UNLOCK ALL or UNLOCK in the wrong work area, the information is lost. See the article on my web site about limited simultaneous users. The same technique can be used here.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top