**********************************************************
** How to limit the number of users for an application ?
**********************************************************
** by Subramanian.G (ramani)
** FoxAcc Software
** ramani_g@yahoo.com
**********************************************************
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 DataEnvironment. This means, MyUser file will remain open with one record locked at startup. This can be done by having a form with this MyUser Table in its data environment (private data environment.) and Form.Visible = .f.
4. Forget about this file.. till the user logs out of application. The QUIT from the application will auto close this.
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.
- Ramani
**********************************************************
** EOF **
** Ramani (Subramanian.G), FoxAcc, ramani_g@yahoo.com
**********************************************************
Evaluate this to make others know how useful is this
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.