Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Open Jet Database with database password

Status
Not open for further replies.

PSiu

Programmer
Aug 7, 1999
3
0
0
CA
Hi, <br>
<br>
I use database password to protect an Access database from unauthorized access as it is easier to manage compared with the user level security. However, I cannot open the database from VB and get an error message of 'Invalid password'. <br>
<br>
Thanks in advance for any help.<br>
<br>
<br>

 
Are you accesing the database via ODBC?<br>
<br>

 
No. I access the database through opendatabase with path and MDB file name. It works when there is no database password created. I try to use the workspace default password but it doesn't work. <br>
<br>
Thanks for your reply.<br>
<br>
<br>

 
PSiu, <br>
<br>
Are you putting the password after the MDB file name. E.G.<br>
AppPath & "Whatever.mdb;PWD=password". If not give this a try, that worked for me with ADO. Good luck.<br>
<br>
<br>
cheskey
 
I get it done. The statement is <br>
<br>
Set mDBPIS = db.OpenDatabase("\PIS.MDB", False, False, "MS Access;PWD=philip")<br>
<br>
<br>
Thanks the help from everybody.<br>

 
Hi!

I got a problem in opening database in DAO object. I got the database with user name and a password protected.

When I use the following string in VB it is giving the following error!

String : set db=opendatabase(&quot;\purchase.mdb&quot;,false,false,&quot;MS Access; USER=admin;
PWD=admin&quot;)

Error : U dont have necessary access to purchase.mdb Object
Have your administrator or the creator of this object establish the permissions for you.

I am in Administrator of W2K M/c. I tried to open Access2.0 Database.

Your kind help is highly appreciated.

Vijay, IT Admin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top