Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Manchester, Gtr Manchester, England
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    relink tables where mdb has password (DAO) (XP/2000)

    I've got a routine which successfully checks the links and if neccessary re-links to a user specified file.

    This uses DAO.

    It was working fine but I have to deliver the database in a couple of hours and have to password protect the backend.

    Now it doesn't work

    How do I retrieve the password and where do I specify it when re-linking? <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

    EDIT

    I've managed to hard code a password but still can't find out where to retrieve it.

    tdf.Connect = ";DATABASE=" & strBackendDB & ";pwd=nottherealpassword"

    <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: relink tables where mdb has password (DAO) (XP/2000)

    Of course you can't retrieve it - that would defeat the purpose, wouldn't it? The idea is that you have to KNOW the password if you want to use the database.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Manchester, Gtr Manchester, England
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: relink tables where mdb has password (DAO) (XP/2000)

    I thought some property of the linked table would know the password of the database where it comes from as when you refresh the links with linked table manager it doesn't ask for the password.

    If I can't then that's ok.

    Thanks for putting my mind at ease.

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Manchester, Gtr Manchester, England
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: relink tables where mdb has password (DAO) (XP/2000)

    I am not having a good day.

    Now when I click the button to check the links the database is going into break mode and I have no idea why.

    The first line of code is an 'are you sure' message box.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: relink tables where mdb has password (DAO) (XP/2000)

    The password is part of the Connect property. This only works if you already have a valid connection. If the password to the database is changed, the Connect property won't automagically change too - you'll have to supply the new password, because the Connect property still contains the old password.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: relink tables where mdb has password (DAO) (XP/2000)

    Try a compact and repair, or simply quit Access and reopen the database.

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Manchester, Gtr Manchester, England
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: relink tables where mdb has password (DAO) (XP/2000)

    That didn't seem to stop it. I resorted to a decompile and that seemed to cure it. Thanks

Posting Permissions

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