open database with password 
Author Message
 open database with password

Hello there

i have database with database password

the password of the database is: a

i'm trying to open the database by using code:

Set dbs = DBEngine.Workspaces(0).OpenDatabase("g:\My Documents\db5.mdb", , ,
"pwd=a")
but this code isn't working.

The error is: runtime error 3031 not a valid password

this password is the password for this database. what i need to do to repair
the code to open a database that protected by database password?



Thu, 03 Mar 2005 18:32:47 GMT  
 open database with password
While the Help file mentions that the 2nd and 3rd parameters in the
OpenDatabase statement are optional, they must be provided if you're trying
to use the 4th parameter. As well, I believe a semi-colon is required before
pwd=. See whether this works:

Set dbs = DBEngine.Workspaces(0).OpenDatabase("g:\My Documents\db5.mdb",
False, False, ";pwd=a")

This will open it in shared mode, not read-only. Change the first False to
True to open it exclusively, change the second False to True to open it
read-only.

BTW, you may be deluding yourself into a sense of security if you think the
password is doing much. Password crackers are extremely inexpensive to
buy...

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele


Quote:
> Hello there

> i have database with database password

> the password of the database is: a

> i'm trying to open the database by using code:

> Set dbs = DBEngine.Workspaces(0).OpenDatabase("g:\My Documents\db5.mdb", ,
,
> "pwd=a")
> but this code isn't working.

> The error is: runtime error 3031 not a valid password

> this password is the password for this database. what i need to do to
repair
> the code to open a database that protected by database password?



Thu, 03 Mar 2005 21:13:06 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Open database with password

2. Opening database with password

3. How to Open Database having password, use OpenDatabase Method

4. Open database with password

5. Opening database with password

6. Opening database with password

7. How open database with password?

8. Open Database with Password

9. Cant open DataBase with password

10. Opening database with password

11. #### Please : VB ---> DAO ----> Access97 / Open Database with Password

12. Open a password protected database with DAO

 

 
Powered by phpBB® Forum Software