dbTalk Databases Forums  

ADODB Connection String with password

comp.databases.ms-access comp.databases.ms-access


Discuss ADODB Connection String with password in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nigel C
 
Posts: n/a

Default ADODB Connection String with password - 08-20-2005 , 02:30 AM






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.


Reply With Quote
  #2  
Old   
Steve Jorgensen
 
Posts: n/a

Default Re: ADODB Connection String with password - 08-20-2005 , 02:46 AM






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
OLEDBatabase 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 (AT) hotmail (DOT) com> wrote:

Quote:
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.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.