Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which users are running program
Message
From
06/03/2012 11:29:47
 
 
To
06/03/2012 00:51:33
Neil Mc Donald
Cencom Systems P/L
The Sun, Australia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01537149
Message ID:
01537398
Views:
68
Usually this will get cleared when the connection that used that lock is closed. This could happen when:
* you reboot/restart server (usually resets everything, but due to extremem nature not something you'd want to do all the time)
* user reboots then reconnects to the server -- usually this clears the previous login session (most likely scenario)
* manual operation by sysadmin to clear the login session
* automatic process goes out and "kills" session that have been dormant over extended period.

>Just curious, how do you handle situation where the user crashes out of the app and the server still has the low level handle open, how do you clear it?
>
>>The solution to have a user run a program to clear flags in a user table is not good. There is too much chance for errors and it is cumbersome and old school. Here is a better way.
>>
>>When a user logs in, the program generates a unique file name, then FCREATES() a text file with that name on a shared drive. The file name is then written to a field in the user's record in the user table. The program then goes through the user table and for each text file name in the use table, attempts to FOPEN the file. If the file can be opened, that user is no longer running the program. You can then clear that field in the user table and erase the text file. If a user shuts down normally, the shutdown process will FCLOSE() the file, then erase it and clear the entry in the user table. The beauty of this is that you run this as part of the standard login/startup process. It's clean in that you don't need some admin user to run a program to clear flags.
>>
>>
>>
>>>Dear all,
>>>What is the best way to know which users is running the program?
>>>I have a MyApp.exe that is in MyApp ( a shared folder ) on my server. I have 20 users that i want to know which user run the program and each user must can only run the program once.
>>>Thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform