Datacontrol for Password secured Access db 
Author Message
 Datacontrol for Password secured Access db

I want to use a datacontrol on a Vb form that has access to a .mdb-file that
has a database password. I know how to get access via Dao-code, but how to
accomplish this when using a control ?
In the 'databasename property' I can only put the location/name of the file
but no password...


Sun, 16 Sep 2001 03:00:00 GMT  
 Datacontrol for Password secured Access db
If you can do it using DAO, how about creating a recordset at run time usign
DAO and assigning it to the control's recordset property?

Quote:

>I want to use a datacontrol on a Vb form that has access to a .mdb-file
that
>has a database password. I know how to get access via Dao-code, but how to
>accomplish this when using a control ?
>In the 'databasename property' I can only put the location/name of the file
>but no password...



Sun, 16 Sep 2001 03:00:00 GMT  
 Datacontrol for Password secured Access db
Thanks, works fine (warning: you must use dao3.5 with the vb5 datacontrol;
using 3.0 leads to  a "Type mismatch" error)

Quote:

>If you can do it using DAO, how about creating a recordset at run time
usign
>DAO and assigning it to the control's recordset property?



Sun, 16 Sep 2001 03:00:00 GMT  
 Datacontrol for Password secured Access db
I believe this will work.  In the connect property of the data control type:

    ;pwd = password

where password is your password.  This is a string and I believe it is similar
to the connect property used in the opendatabase method of dao.

Quote:

> I want to use a datacontrol on a Vb form that has access to a .mdb-file that
> has a database password. I know how to get access via Dao-code, but how to
> accomplish this when using a control ?
> In the 'databasename property' I can only put the location/name of the file
> but no password...

--
*************************************************
Robert Cox
MarCo Instrumentation & Control Systems, Inc.
Tel:  (919) 859-1373  Fax:  (919) 859-1352
http://www.marco-ics.com
*************************************************


Sat, 22 Sep 2001 03:00:00 GMT  
 Datacontrol for Password secured Access db
Here is what I have found to work... just an expansion on the previous
reply.. (Just a cut from one of my current functions.)

If Len(SecFile) Then

    DBEngine.SystemDB = Data_Path + "system.mdw"
    DBEngine.DefaultUser = Trim$(U_Info(Index).UID)
    DBEngine.DefaultPassword = Trim$(U_Info(Index).Password)

End If

Set WSpace = DBEngine.Workspaces(0)
Set POSDB = WSpace.OpenDatabase(Trim$(InFile$), False, False, ";pwd=" +
U_Info(Index).Password)

Quote:

>I believe this will work.  In the connect property of the data control
type:

>    ;pwd = password

>where password is your password.  This is a string and I believe it is
similar
>to the connect property used in the opendatabase method of dao.


>> I want to use a datacontrol on a Vb form that has access to a .mdb-file
that
>> has a database password. I know how to get access via Dao-code, but how
to
>> accomplish this when using a control ?
>> In the 'databasename property' I can only put the location/name of the
file
>> but no password...

>--
>*************************************************
>Robert Cox
>MarCo Instrumentation & Control Systems, Inc.
>Tel:  (919) 859-1373  Fax:  (919) 859-1352
>http://www.marco-ics.com
>*************************************************



Thu, 27 Sep 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. accessing records in one secure DB from another secure DB - programatically

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

3. VB5/Access97 - Password Protected DB with VB5 DataControl

4. how to access secured access db?

5. Access secured Access DB from VB .40

6. Accessing a secured Access 2.0 DB with VB4.0 16-bit

7. Using a Data Control in VB5 accessing a user-level secure Access 97 DB

8. Create a db access db with password

9. Create a db access db with password

10. ADO Datacontrol and Access password

11. How to access mdb password with datacontrol

12. Access 97 secure backend password

 

 
Powered by phpBB® Forum Software