Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which users are running program
Message
From
06/03/2012 00:51:33
Neil Mc Donald
Cencom Systems P/L
The Sun, Australia
 
 
To
05/03/2012 06:57:35
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:
01537360
Views:
64
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
Regards N Mc Donald
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform