CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 1999
    Location
    Brooklyn, NY USA
    Posts
    171

    Password Protected DB and Data Environment

    Could anybody give me step by step instructions how to protect Access database with Password and then to open it in Data Environment. I'm doing something wrong and can't understand what. All the time when I'm testing connection I get an error message about invalid password or user name. I tryed to secure db with Password, I tryed to create User with Password. Everything fails.
    Thank you.
    Vlad
    [email protected]


  2. #2
    Join Date
    Jan 1999
    Posts
    24

    Re: Password Protected DB and Data Environment

    It is easy with VB6!
    Do the following step:
    1. Sercure your Access DB with Password
    2. In the DataEnvironment, point to connection and chose Properties.
    3.The DataLinks Properties appear.In the Provider tab, chose Jet 3.51 OleDB Provider (or 4.0). Double click to goto the Connection tab.
    4. Browse to the Acces Database that you want to connect
    5. Check 'Allow saving password' if you want
    6. Goto All tab,double click on Password item, type the Access sercure password.
    7. It done !

    =============
    Bye and good luck!
    H.Q.Cuong


  3. #3
    Join Date
    Apr 1999
    Location
    Brooklyn, NY USA
    Posts
    171

    Re: Password Protected DB and Data Environment

    Thanks for answer.
    I do the following steps:
    1. I make a copy of NWind.mdb from VB folder to my Test folder.
    2. I open exclusivly NWind.mdb
    3. Through Tools-Security-Set Database Password I enter the word 'Test' twice (without quotes).
    4. I close NWind
    5. I open NWind, it gives me "Password Required" dialog.
    6. I enter 'Test'. DB opens. Fine.
    7. I start new VB project and add trough Project-More ActiveX Disigners- DataEnvironment DataEnvironment1
    8. There is Connection1 inside
    9. I make right click on Connection1 and click on Properties
    10.Data Link Properties dialog appears.
    11.Either double clicking on Microsoft Jet OLEDB3.51 Provider or highlighting the same item and clicking on Next button brings me to the tab where I select NWind.mdb (my copy).
    12.By default User Name is Admin, I enter 'Test' (my password). I tried to enter password on the Connection tab and on the All tab with the same bad result.
    13.I click on Test Connection button and receive Error message saying: "Test connection failed because of an error in initializing provider.Can't start your application. The workgroup information file is missing or opened exclusively by another user"
    I tried to protect DB different way (steps from 1 to 6). I set a password through Tools-Security-User and Group Accounts (in Access ofcource), I was able to open NWind as Admin with 'Test' password in Access, but I had the same error message.
    Assuming that something is wrong with installation of Access or VB I repeted my steps on several computers with no success. Sorry for so long description, I just want to be more informative to avoid some misunderstanding.
    What I'm doing wrong or missing?

    Thank you
    Vlad
    [email protected]


  4. #4
    Join Date
    Jan 1999
    Posts
    24

    Re: Password Protected DB and Data Environment

    Hello.
    Ohh. . ., I am sorry that I missed a importance thing.Do not type the password in the Connection Tab, goto the All tab and type it in the Password Item !
    Bye.


  5. #5
    Join Date
    Jan 1999
    Posts
    24

    Re: Password Protected DB and Data Environment

    Hello.
    Sorry, I am wrong.
    Go to the All tab and set then 'Jet OLEDBatabase Password' to your DataBase password.
    Bye


  6. #6
    Join Date
    Apr 1999
    Location
    Brooklyn, NY USA
    Posts
    171

    Re: Password Protected DB and Data Environment

    Thank you very much. 20 minutes before I found this way myself. I spend several days to try to make connection. Everybody gives me the wrong answer. I've got almost 20 of them from different sources (Mailing Lists, News Groups).I'm surprising. Nobody is working with Password protected database in Access? The same problem I had with regular data control and password protected DB. The answer was simple-you need to type password in Connect property (Type, not chose) of data control.
    Anyway, thank you very much again
    Vlad


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