GETTING A LIST OF LOGGED-IN USERS WITH ADO

One more feature that's worthwhile in ADO is the capability to see a list of users who are logged in to a database. This is useful only if you're using Access security.

ADO and Jet let you list logged-in users through a method of the OpenSchema connection object. You then pass a GUID that tells ADO you want to see the Jet schema roster. You can see this in Listing 22.17 by calling ap_ListUsers.

Listing 22.17. Chap22(ADO).mdb: Displaying Logged-In Users
 Option Compare Database Public Const JET_SCHEMA_USERROSTER = _ "{947bb102-5d43-11d1-bdbf-00c04fb92675} " Function ap_ListUsers() As String Dim cnnCurr As New ADODB.Connection Dim rstCurr As New ADODB.Recordset Dim strName As String ' Open the connection ...

Get F. Scott Barker's Microsoft® Access 2000 Power Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.