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

How to limit the number of users for an application ?

Installation

How to limit the number of users for an application ?

by  ramani  Posted    (Edited  )
**********************************************************
** 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 :)
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top