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

limiting the number of users 1

Status
Not open for further replies.

unit512

MIS
Mar 12, 1999
233
0
0
US
Does anyone know a clean method to control the number of users in a network application?

We do NOT want to track this in a log file unless there is a way to self clean the log if some crashes out of the program without logging off.

Thanks,
OTG Glenn Abelson
ACI
Computer Systems For Business
 
Hi!

Yes, there is a way to self-clean the log. In the application update the log file each minute so the date/time there is alays recent. When application crashes, the date/time is not updated. So if the date/time is older than 1 minute, you will know that that user is logout.

Hope this helps.
Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
Hi
1. Create one MyUsers file in the network place.
2. Have in that file exactly as many records as the number of users.
3. As and when the users log in to the application, the first thing to do is to LOCK one available unlocked record in this user file in a separate DE. This means, MyUser file will remain open with one record locked at startup.
4. Forget about this file.. till the user logs out of application.
5. If a user cannot get a free record.. it means the limit is reached.. and you can put up a message and log out the user.

The thing is that when a system crashes, the record lock automatically gets removed, and the record becomes available. No clean up is required. A similar suggestion has been provided by me else where in this forum with more details.


ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top