Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining Users in Application?
Message
From
19/04/2000 01:18:25
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00360885
Message ID:
00361159
Views:
20
>Is there a way that I can determine how many computers, and maybe the name of the computers that are logged in to my application at any given time?
>
I have solved this problem without the user haveing to log on.
1. Create a table loggedon.dbf for example with at least a field that can hold a file name. This table should be opened shared.
2. Every time the app starts create a dummy dbf file and open it exclusive and write the filename to the loggedon.dbf.
3. Delete the dummy dbf file and remove the record in loggedon.dbf when the user closes the app.

Then all you have to do to know how many users currently logged on is to count all the files in the loggedon.dbf that you CAN'T open. Becouse if you can open it some computer has not done step 3, maybe becouse of a crash or something...
---( Mårten Törnquist )---
Previous
Reply
Map
View

Click here to load this message in the networking platform