Limiting number of user concurrently connected to Access97 mdb with VB


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Limiting number of user concurrently connected to Access97 mdb with VB

Hybrid View

  1. #1
    Jeff Binnig Guest

    Limiting number of user concurrently connected to Access97 mdb with VB

    I am want to limit the number of users connecting with my VB program to a
    Access97 database.
    Is there a way to keep track of the users in access, I noticed a user
    collection in Access but saw no properties regarding if they were currently
    connected.
    What schemes can I use to limit the no. of users. It has to be n > 1 so
    exclusive mode won't work.
    Thanks
    Jeff
    --
    -----------------------------------------------------------
    Chemical Information Services, Inc.
    Mailing Address: P.O. Box 743512 Dallas, TX U.S.A 75374
    Corporate Offices: 9550 Forest Lane, Suite 321 Dallas, TX U.S.A. 75243
    Tel: 214-349-6200 Ext. 106 Fax: 214-349-6286
    www.chemicalinfo.com



  2. #2
    Ted McNeal Guest

    Re: Limiting number of user concurrently connected to Access97 mdb with VB


    Jeff,

    If you are using ADO and Jet 4 then you can determine the number of users
    logged into the database. I am sure there is an example on MSDN.
    Alternatively, you can keep a tally for yourself. If you are using a centralized
    mdw file this can be easy or create another database. You can create a table
    in the mdw file to keep a tally of the number of users that are logged into
    the database. Create a table with a single field of an appropriate numerical
    data type. Set a validation rule to reflect the maximum number of users
    that you want to login synchronically, such as <=10. Then on application
    startup use a sql update statement to add 1, such as UPDATE tblUsers SET
    UserCount = UserCount + 1. If you have exceeded the maximum number of users
    then the update statement will fail based upon the validation rule. If you
    are using DAO then you must use dbFailOnError in the Option parameter of
    the execute method for it to give you a runtime error. You can trap this
    error, notify the users and close the app. Remember to run another update
    statement to remove the user from the tally when a successfully logged in
    application closes.

    Ted


    "Jeff Binnig" <jeff@chemicalinfo.com> wrote:
    >I am want to limit the number of users connecting with my VB program to

    a
    >Access97 database.
    >Is there a way to keep track of the users in access, I noticed a user
    >collection in Access but saw no properties regarding if they were currently
    >connected.
    >What schemes can I use to limit the no. of users. It has to be n > 1 so
    >exclusive mode won't work.
    >Thanks
    >Jeff
    >--
    >-----------------------------------------------------------
    >Chemical Information Services, Inc.
    >Mailing Address: P.O. Box 743512 Dallas, TX U.S.A 75374
    >Corporate Offices: 9550 Forest Lane, Suite 321 Dallas, TX U.S.A. 75243
    >Tel: 214-349-6200 Ext. 106 Fax: 214-349-6286
    >www.chemicalinfo.com
    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center