CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2000
    Location
    india
    Posts
    49

    OpenDatabase method ?

    Hi,
    Can somebody tell me what is the correct syntax to open a pasword protected access (.mdb) database using DBEngine.OpenDatabase method.
    Thanks advance.


  2. #2
    Join Date
    Nov 2000
    Posts
    77

    Re: OpenDatabase method ?

    dim dbName as Database
    dim sdbLocation as String

    ' Assuming that your password is testpassword, the code will look as follows

    sdbLocation = "C:\Test.mdb"
    Set dbName = OpenDatabase(sdbLocation, False, False, ";pwd=" & "testpassword")

    Sameer!!!


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

Featured