Connecting Tech Pros Worldwide Forums | Help | Site Map

ADODB Connection String with password

Nigel C
Guest
 
Posts: n/a
#1: Nov 13 '05
Access 2000 - A am trying to access another Access 2000 database from a

code module. I have seen examples of the ADODB connection string - to
connect to an access database however the database that I am connecting

to has a database password - I get an error message when attempting to
specify the 'connect' parameter.
The following is an example...


Dim cnn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim strSQL As String


Set cnn = New ADODB.Connection
cnn.Provider = "Microsoft.Jet.OLEDB.4"
cnn.Open "C:\Schedule Analysis.mdb", "Admin", "MadeUpPassword"


However the open statement throws up the following error...
Error Number - "3706"
Description - "Provider cannot be found. It may not be properly
installed."


Any thoughts on what is wrong here?
Many Thanks.

Steve Jorgensen
Guest
 
Posts: n/a
#2: Nov 13 '05

re: ADODB Connection String with password


All you need to know, you can get from here -
http://www.connectionstrings.com/

The specific example listed there for your case is...
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet
OLEDB:Database Password=MyDbPassword;"

Note that a database password is something distinct and different from a user
name and password used with workgroup security. A database password is never
supplied using the password argument.


On 19 Aug 2005 23:30:12 -0700, "Nigel C" <nigelpcorrigan@hotmail.com> wrote:
[color=blue]
>Access 2000 - A am trying to access another Access 2000 database from a
>
>code module. I have seen examples of the ADODB connection string - to
>connect to an access database however the database that I am connecting
>
>to has a database password - I get an error message when attempting to
>specify the 'connect' parameter.
>The following is an example...
>
>
> Dim cnn As ADODB.Connection
> Dim rs As ADODB.Recordset
> Dim strSQL As String
>
>
> Set cnn = New ADODB.Connection
> cnn.Provider = "Microsoft.Jet.OLEDB.4"
> cnn.Open "C:\Schedule Analysis.mdb", "Admin", "MadeUpPassword"
>
>
>However the open statement throws up the following error...
>Error Number - "3706"
>Description - "Provider cannot be found. It may not be properly
>installed."
>
>
>Any thoughts on what is wrong here?
>Many Thanks.[/color]

Closed Thread