Results 1 to 1 of 1
  1. #1
    Join Date
    Feb 2003

    Question 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, _
    , "{947bb102-5d43-11d1-bdbf-00c04fb92675}")

    m_tLDBInfo.strErrorMsg = vbNullString

    How do I supply the password?
    Last edited by jameselmer; 02-21-03 at 11:59.
    James Elmer
    Clinical Programmer Analyst
    Wellstat Biologics Corporation
    800.227.0582 x3338

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts