INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Installation

How to limit the number of users for an application ? by ramani
Posted: 10 Nov 01 (Edited 22 Jan 04)

**********************************************************
** 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

Back to Microsoft: Visual FoxPro FAQ Index
Back to Microsoft: Visual FoxPro Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close