Results 1 to 2 of 2

Thread: DAO password

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Location
    Buenos Aires / Owner Company
    Posts
    1

    Unhappy

    Hi :
    I need open Access DB with password database ,with DAO
    ( NOT OBDC ) .
    I put this password in Access 97 , not in VB
    I have VB 5.0

    thanks

  2. #2
    Lively Member dlm's Avatar
    Join Date
    Oct 2000
    Location
    Geraardsbergen(Belgium)
    Posts
    91
    Hi,

    You just need to create a workspace


    Sub CreateWorkspaceX()

    Dim wrkODBC As Workspace
    Dim wrkJet As Workspace
    Dim wrkLoop As Workspace
    Dim prpLoop As Property

    ' Create an ODBCDirect workspace. Until you create
    ' Microsoft Jet workspace, the Microsoft Jet database
    ' engine will not be loaded into memory.
    Set wrkODBC = CreateWorkspace("ODBCWorkspace", "admin", _
    "", dbUseODBC)
    Workspaces.Append wrkODBC

    DefaultType = dbUseJet
    ' Create an unnamed Workspace object of the type

    ' specified by the DefaultType property of DBEngine
    ' (dbUseJet).
    Set wrkJet = CreateWorkspace("", "admin", "")

    ' Enumerate Workspaces collection.
    Debug.Print "Workspace objects in Workspaces collection:"
    For Each wrkLoop In Workspaces
    Debug.Print " " & wrkLoop.Name
    Next wrkLoop

    With wrkODBC
    ' Enumerate Properties collection of ODBCDirect
    ' workspace.
    Debug.Print "Properties of " & .Name
    On Error Resume Next

    For Each prpLoop In .Properties
    Debug.Print " " & prpLoop.Name & " = " & prpLoop
    Next prpLoop
    On Error GoTo 0
    End With

    With wrkJet
    ' Enumerate Properties collection of Microsoft Jet
    ' workspace.
    Debug.Print _
    "Properties of unnamed Microsoft Jet workspace"
    On Error Resume Next
    For Each prpLoop In .Properties
    Debug.Print " " & prpLoop.Name & " = " & prpLoop
    Next prpLoop
    On Error GoTo 0
    End With

    wrkODBC.Close
    wrkJet.Close

    End Sub



    If you can solve the problem, why worrying about it…
    If you can’t solve the problem, worrying won’t help…

    De la Motte Günther

Posting Permissions

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



Click Here to Expand Forum to Full Width