Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2009
    Posts
    21

    Unanswered: determining the number of current users

    I am using Access 2003 and have created two-levels of logins -- user and admin. Individuals will not have individual logins, they will simply login as User or Admin. There are some functions -- e.g., Compacting and Creating Backups that I do not want to run if there is more than one person logged in -- but I have no idea how to determine how many people are logged in.

    Sorry for all the newbie questions...

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    Have a look at the Jet User Roster to see who's logged in.

    How are the user/admin levels setup? Is it just a table with coding, or is it Access user security? If it's the later, someone else may need to help as I always use the first approach.
    Me.Geek = True

  3. #3
    Join Date
    Jun 2009
    Posts
    21
    I am using Access user security.

    But thanks for pointing me towards the Jet User Roster (sorry I missed that!).

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I use the first approach or the cloning launch approach.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Aug 2003
    Location
    Bulgaria, Plovdiv
    Posts
    36
    I don't know how Windows Authentication or Access Authentication (User Roster) can help if someone wants to see haw many users are logged on into Access Database.

    I created VB code and tables to solve the problem. I works in this way.

    1. There is a login screen which has nothing to do with MS Windoes or Access Security.
    2. When Loggin is successfull flag is set to True. And it shows if user is LoggedOn.
    3. The flag is cleared when the main Application Windows is closed.

    In this way you can even add ConnectedTime functions, Activity By dates and hours and count the number of transactions per user bases.

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by danisapfirov
    I don't know how Windows Authentication or Access Authentication (User Roster) can help if someone wants to see haw many users are logged on into Access Database.

    I created VB code and tables to solve the problem. I works in this way.

    1. There is a login screen which has nothing to do with MS Windoes or Access Security.
    2. When Loggin is successfull flag is set to True. And it shows if user is LoggedOn.
    3. The flag is cleared when the main Application Windows is closed.

    In this way you can even add ConnectedTime functions, Activity By dates and hours and count the number of transactions per user bases.
    I remain to be convinced that you approach is better than examining the lock file for the MDB, which effectively is the user roster that nckdryr and Startrekker suggest. short of your code periodically sending a here I am message to your monitoring system then you don't know if a user is still using the system. theoretically this also happens to the ldb file, but I'd reckon its a lot less likely to have false positives than what you've outlined
    I'd rather be riding on the Tiger 800 or the Norton

  7. #7
    Join Date
    Aug 2003
    Location
    Bulgaria, Plovdiv
    Posts
    36
    Reading LDB file seems better but I wonder what will happen if the front end Access Application is connected to few backend files. Which LDB file should be read then? So thinks are getting more complex... That's why I believe my aproach is good enough. It also allows me to set someones active flag to false which generates a mesage to user that he/she must exit the program and database needs to be closed.
    And another good point is that this aproach can be scaled to SQL Server allowing user monitoring and stoping acess to the service when it's needed.
    Last edited by danisapfirov; 07-12-09 at 15:42.

  8. #8
    Join Date
    May 2005
    Posts
    1,191
    If you're connecting to multiple Access back-ends, then I think it may be time to upgrade to SQL server or Oracle or some equivelent software that is meant to be a back-end server. If that be the case, then yes, maybe a user activity table setup may be required.

    But let's not make things harder than they need to be. If db_girl only has one Access back-end as her post implies, then the Jet UserRoster would (in my opinion) be the simplest and easiest to implement solution to figure out who's in the database.

    Also, since db_girl needs to know who's in the back-end so that she can do maintenance (as said in post #1), even if she did have multiple databases then she would still have to make your user-table system "know" where each user is in each database, making it even more complicated. And using multiple Jet User Rosters would (again, in my opinion) still be the easier solution.

    The only time I see the need for a user activity table type setup is when you need to have a permanent record of who logged in where at what time from what machine, etc. But I don't think that's what db_girl is asking for, correct me if I'm wrong.

    Me.Geek = True

  9. #9
    Join Date
    Aug 2003
    Location
    Bulgaria, Plovdiv
    Posts
    36
    That's right. This may help db-girl. But if someone is looking for Access-SQL Server compatibility then another solution is needed as we don't have LDB files when connecting to SQL Server backend databases.
    Cheers.
    Last edited by danisapfirov; 07-12-09 at 16:12.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •