Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    38

    Question Unanswered: MDW file path from VB

    How can I get the MDW file path from within DB? And how can I pass that value to a query that gets the list of all the users?

    Thanx agead

  2. #2
    Join Date
    Jan 2004
    Location
    Toronto, Canada
    Posts
    259
    I know a way through ADO recordset...

    Dim conn as adodb.connection
    Dim rst as ADODB.recordset
    Set conn = currentproject.connection
    set rec = new adodb.recordset

    Set rst = conn.OpenSchema(adSchemaProviderSpecific, , _
    "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
    Do until rst.eof
    debug.Print rst!COMPUTER_NAME
    debug.Print rst!LOGIN_NAME
    debug.Print rst!CONNECTED
    debug.Print rst!SUSPECTED_STATE

    rst.MoveNext
    Loop

    This is getting the User Roster feature in Jet 4.0 to get all the users connected to a DB.

  3. #3
    Join Date
    Mar 2004
    Posts
    38

    The problem is the path, not getting the user list!

    Originally posted by Jerrie
    I know a way through ADO recordset...

    Dim conn as adodb.connection
    Dim rst as ADODB.recordset
    Set conn = currentproject.connection
    set rec = new adodb.recordset

    Set rst = conn.OpenSchema(adSchemaProviderSpecific, , _
    "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
    Do until rst.eof
    debug.Print rst!COMPUTER_NAME
    debug.Print rst!LOGIN_NAME
    debug.Print rst!CONNECTED
    debug.Print rst!SUSPECTED_STATE

    rst.MoveNext
    Loop

    This is getting the User Roster feature in Jet 4.0 to get all the users connected to a DB.
    I got the user list in using plain ol' SQL:
    SELECT MSysAccounts.FGroup, MSysAccounts.Name, MSysAccounts.OLDSID, MSysAccounts.Password, MSysAccounts.SID
    FROM MSysAccounts IN 'C:\Utils\Programming\Projects\Access CellSlim\users.mdw'

    The problem is I wanna do it flexible, so I could change the location of the .mdw file.

  4. #4
    Join Date
    Jan 2004
    Location
    Toronto, Canada
    Posts
    259
    do it flexible? as in so u can move that user.mdw?
    well the code above does that...it doesn't access the .mdw...

    but u cant move the .mdw cant u?

  5. #5
    Join Date
    Mar 2004
    Posts
    38
    Originally posted by Jerrie
    do it flexible? as in so u can move that user.mdw?
    well the code above does that...it doesn't access the .mdw...

    but u cant move the .mdw cant u?
    The code abov does that, but its in VB and I need it in SQL, I wanna make the SQL flexible....

Posting Permissions

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