Results 1 to 5 of 5

Thread: Access database password (DAO)

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Access database password (DAO)

    Without the database password, the software runs fine. I can access the database and the recordsets.

    VB Code:
    1. Set dbsCanon = OpenDatabase(App.Path & "\Data\CAICTBLS.dat")

    But when I implemented a password in the access database (I opened it in access and set a password), my OpenDatabase statement says the password is invalid even though they are the same.

    VB Code:
    1. Set dbsCanon _
    2.    = OpenDatabase(App.Path & "\Data\CAICTBLS.dat", , , "Microsoft Access database;pwd=canon")

    I tried searching MSDN for a sample but couldn't find one.

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    leinad31


    Try Password=cannon

  3. #3
    New Member
    Join Date
    Sep 2003
    Posts
    7
    You need to pass value for the 2 parameters that you skip.
    This is due to a bug of DAO

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629
    Oh so they aren't really optional? Okie, I'll try both suggestions later. Thanks.

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629
    Had to tinker with the settings, but I was able to make it work like so;

    VB Code:
    1. Set dbsCanon = OpenDatabase(App.Path & "\Data\CAICTBLS.dat", False, False, ";pwd=canon")

    Thanks for your help.
    Last edited by leinad31; Oct 1st, 2003 at 01:08 AM.

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