Jump: Search for: 

Free Resources from FMS

 

Thank you! Thank you! I just finished reading this document, which was part of a link in the recent Buzz newsletter. I have printed it for others to read, especially those skeptical on the powers of Access and its capabilities.

Darren D.

 

 

 

 

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

Provided by :  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 4 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 References: Microsoft ActiveX Data Objects 2.1 Library
Sample Code

Return to the tips page

Feedback

Contact Us  l   Web questions: Webmaster   l   Copyright © 2010 FMS, Inc., Vienna, Virginia
Celebrating 24 Years of Software Excellence