O'Reilly logo

F. Scott Barker's Microsoft® Access 2000 Power Programming by F. Scott Barker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required