How do I open a password protected Access database from VB 
Author Message
 How do I open a password protected Access database from VB

I want to put a password on my Access database file, so you have to supply
the password to open the file. In VB, where in the OpenDatabase statement
do I supply the password. The help file is referring to   CreateWorkspace,
how do I use that.

Thanks



Fri, 20 Oct 2000 03:00:00 GMT  
 How do I open a password protected Access database from VB

Yes You can put database password in your Access database. What you need to
do is

dim MYdb as database
dim Myworkspace as workspace

Set MYdb = Myworkspace.OpenDatabase("c:\development\mydb.mdb", False,
False, ";PWD=version")

your database password is 'version'

god luck



I want to put a password on my Access database file, so you have to supply
the password to open the file. In VB, where in the OpenDatabase statement
do I supply the password. The help file is referring to   CreateWorkspace,
how do I use that.

Thanks
----------



Fri, 20 Oct 2000 03:00:00 GMT  
 How do I open a password protected Access database from VB

Jeff - I'll agree with you. I've tried many times to open an Access database
with a database level password without luck. However - as you state, you can
access a secured database that was protected using full blown security by
using the DBEngine.SystemDB object and property.

Gary Blouin

|
|>I want to put a password on my Access database file, so you have to supply
|>the password to open the file. In VB, where in the OpenDatabase statement
|>do I supply the password. The help file is referring to   CreateWorkspace,
|>how do I use that.
|
|I could be wrong here, but I don't think there's any way to supply a
|password if you've use the Set Database Password option from the Security
|sub-menu. The password this (the CreateWorkspace function) is referring to
|is true Access-based security which you get by creating your own workgroup
|database. Access security can be complex, by the way. Don't go into it
|lightly.
|Again, I could be wrong, because I always use full-blown security, not a
|database password, so I've never tried to do what I think you're
suggesting.
|
|



Fri, 20 Oct 2000 03:00:00 GMT  
 How do I open a password protected Access database from VB

Quote:
>I want to put a password on my Access database file, so you have to supply
>the password to open the file. In VB, where in the OpenDatabase statement
>do I supply the password. The help file is referring to   CreateWorkspace,
>how do I use that.

CreateWorkspace is used when you are using Jet security. If you are
just using a simple database-level password, do:

set db =
dbengine(0).opendatabase("yourdb.mdb",false,false,";pwd=yourpwd")

-- Jim Ferguson, FMS
   http://www.fmsinc.com



Sat, 21 Oct 2000 03:00:00 GMT  
 How do I open a password protected Access database from VB

Quote:

>I want to put a password on my Access database file, so you have to supply
>the password to open the file. In VB, where in the OpenDatabase statement
>do I supply the password. The help file is referring to   CreateWorkspace,
>how do I use that.

I could be wrong here, but I don't think there's any way to supply a
password if you've use the Set Database Password option from the Security
sub-menu. The password this (the CreateWorkspace function) is referring to
is true Access-based security which you get by creating your own workgroup
database. Access security can be complex, by the way. Don't go into it
lightly.
Again, I could be wrong, because I always use full-blown security, not a
database password, so I've never tried to do what I think you're suggesting.


Sat, 21 Oct 2000 03:00:00 GMT  
 How do I open a password protected Access database from VB

Thanks Jim.



Quote:
> >I want to put a password on my Access database file, so you have to
supply
> >the password to open the file. In VB, where in the OpenDatabase
statement
> >do I supply the password. The help file is referring to  
CreateWorkspace,
> >how do I use that.

> CreateWorkspace is used when you are using Jet security. If you are
> just using a simple database-level password, do:

> set db =
> dbengine(0).opendatabase("yourdb.mdb",false,false,";pwd=yourpwd")

> -- Jim Ferguson, FMS
>    http://www.fmsinc.com



Sat, 21 Oct 2000 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. How to open password protected access database?

2. Opening an Access database protect with a password in VB5

3. How to open a password protected Access database

4. Opening Password Protected Access Database

5. Opening a Password Protected Access Database

6. Opening a password-protected Access database

7. Opening an Access database protect with a password in VB5

8. (Urgent) Use Data Control (DAO) to open a password protected Access Database

9. Open password protected Access Database from VB4

10. Opening Password Protected Access Database

11. Opening Password Protected Access Database

12. How to open password-protected Access database?

 

 
Powered by phpBB® Forum Software