How to open a password protected db (access) 
Author Message
 How to open a password protected db (access)

Please help me its driving me crazy. For this project I use an adodc object.
(created at design time)
The project is to store all my passwords I have on various websites, so I
don't have to remember them all.
I want it to be password protected because just in case someone hacks my pc
or something.
I might also use encryption. If I ever get beyond this password problem that
is.

' // begin MSDN code
Function OpenProtectedDB(strDBPath As String, _
                         strPwd As String)
   Dim cnnDB As ADODB.Connection

   Set cnnDB = New ADODB.Connection

   ' Open database for shared (by default), read/write access, and
   ' specify database password.
   With cnnDB
      .Provider = "Microsoft.Jet.OLEDB.4.0"
      .Properties("Jet OLEDB:Database Password") = strPwd  '// in my case:
nx74205 (I'll create a startup form requesting for this password)
      .Mode = adModeReadWrite
      .Open strDBPath ' // I use app.path & "\internet.mdb"
   End With
   ' Code to work with database goes here. ' // how to tell that
datagrid1.datasource=adodc1
   cnnDB.Close
   Set cnnDB = Nothing
End Function
' // end MSDN code

i tried adodc1.connectionstring=cnndb , set datagrid1.datasource=adodc1 ,...
and another million other possibilties.

Now my problem is how do I set a datagrid's datasource to the only table
(name="Internet") in the database?I've been trying for days and still
haven't found it. I read other posts concerning db passwords but found
nothing that helps me.Sometimes I think I found it but then the stupid
program complains about not having found a workgroup information file.
Searched a bit on this in MSDN but found nothing usefull. Since I'll be the
only one using this program I'm in no need to have multiple user support
with that workgroup info file.
I'll appreciate very much if someone posted some code about this. Perhaps a
simple example in a zip file?

thank you very much.



Fri, 17 Oct 2003 06:37:48 GMT  
 How to open a password protected db (access)
You need to specify the location of the system.mdw or other workgroup file


Quote:
> Please help me its driving me crazy. For this project I use an adodc
object.
> (created at design time)
> The project is to store all my passwords I have on various websites, so I
> don't have to remember them all.
> I want it to be password protected because just in case someone hacks my
pc
> or something.
> I might also use encryption. If I ever get beyond this password problem
that
> is.

> ' // begin MSDN code
> Function OpenProtectedDB(strDBPath As String, _
>                          strPwd As String)
>    Dim cnnDB As ADODB.Connection

>    Set cnnDB = New ADODB.Connection

>    ' Open database for shared (by default), read/write access, and
>    ' specify database password.
>    With cnnDB
>       .Provider = "Microsoft.Jet.OLEDB.4.0"
>       .Properties("Jet OLEDB:Database Password") = strPwd  '// in my case:
> nx74205 (I'll create a startup form requesting for this password)
>       .Mode = adModeReadWrite
>       .Open strDBPath ' // I use app.path & "\internet.mdb"
>    End With
>    ' Code to work with database goes here. ' // how to tell that
> datagrid1.datasource=adodc1
>    cnnDB.Close
>    Set cnnDB = Nothing
> End Function
> ' // end MSDN code

> i tried adodc1.connectionstring=cnndb , set datagrid1.datasource=adodc1
,...
> and another million other possibilties.

> Now my problem is how do I set a datagrid's datasource to the only table
> (name="Internet") in the database?I've been trying for days and still
> haven't found it. I read other posts concerning db passwords but found
> nothing that helps me.Sometimes I think I found it but then the stupid
> program complains about not having found a workgroup information file.
> Searched a bit on this in MSDN but found nothing usefull. Since I'll be
the
> only one using this program I'm in no need to have multiple user support
> with that workgroup info file.
> I'll appreciate very much if someone posted some code about this. Perhaps
a
> simple example in a zip file?

> thank you very much.



Thu, 30 Oct 2003 08:08:37 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. how do i access a password protected MS-ACCESS db without the password

2. open a password protected MS-Access DB

3. problems opening password-protected Access 2k db

4. Opening a password protected Access DB

5. Using ADO to open a password protected Access DB.

6. Opening Password protected Access 2000 DB

7. Accessing a Password Protected Access DB

8. Using VB to open a password protected db

9. Opening password-protected DB

10. How to open a password protected DB?

11. Opening an MSAccess password-protected DB

12. Open a password protected DB file

 

 
Powered by phpBB® Forum Software