Using the User Roster to Check for Users in a Microsoft Access Database

Provided by the FMS Development Team

Version 4.0 of the OLE DB Provider for Microsoft Jet added support for several new schema rowsets that were not previously available. The most notable of these is the User Roster schema rowset. The user roster is exposed as a provider-specific schema rowset in the Jet 4 OLE DB provider. Since provider-specific schemas are not listed in ADO's type library for schema rowsets, you must use a GUID to reference the schema like this one.

The four things that can be returned for this schema are:

  1. Name of the computer that the user is using.
  2. Security name.
  3. Whether or not the user is currently connected to the database. (A user's ID remains in the lock database until the last user disconnects or until the slot is reclaimed for a new user connection.)
  4. Whether or not the user connection was terminated normally.

Below is an example Function of the User Roster code that checks which users are in a Microsoft Access database. You should be able to cut and paste everything from the "Begin Function" line to the "End Example" line into a new module and have it work for you.

Required Library Reference: Microsoft ActiveX Data Objects 2.1 Library (or later version)

Sample VBA Code

An example of the VBA code is provided here: VBA Code for Getting the User Roster of a Microsoft Access Database

See it in Action

To see how we've applied these Microsoft Access Jet Engine features into a database monitoring system, check out our Total Access Admin product which gives you a live view of users going in and out of your database. Manage multiple databases in one screen and even log the activity into a table.

Monitor the activity on Multiple Microsoft Access Databases

A fully functional, free trial version of Total Access Admin is also available.

Total Access Admin Manual

Microsoft Access 2016 Version is shipping!

New Features

Also Version 11.6 for Access 2003 and earlier

Supports database formats for Microsoft Access 2016, 2013, 2010, 2007, 2003, 2002, 2000, and 97


View all FMS products for Microsoft Access All Our Microsoft Access Products

Reviews

"Total Access Admin is a tool of immense value for any database administrator, so if you are one, don't miss this chance to make your life so much easier!"

- Nikolaev Alexander Dmitrievich


"Seeing live who's going in and exiting an Access database is incredibly helpful for supporting our multi-user environment"

- FMS Customer

Admin Info

Additional Info

 

 

Free Product Catalog from FMS