Unanswered: See who's logged on . . . Supplying database password
I want to see who is logged on to my database application and I am able to do this when I remove the database password manually. I would like to be able to supply this password programatically. Here is the code I have so far (it's borrowed):
On Error GoTo ErrHandler
Dim cn As Object
Dim rs As Object
Dim i As Integer
Const adSchemaProviderSpecific = -1
Set cn = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open "Data Source=" & Me.txtDBPath
' The user roster is exposed as a provider-specific schema rowset
' in the Jet 4 OLE DB provider. You have to use a GUID to
' reference the schema, as provider-specific schemas are not
' listed in ADO's type library for schema rowsets
Set rs = cn.OpenSchema(adSchemaProviderSpecific, _
m_tLDBInfo.strErrorMsg = vbNullString
How do I supply the password?
Last edited by jameselmer; 02-21-03 at 10:59.
Clinical Programmer Analyst
Wellstat Biologics Corporation