ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ADODB Connection String (https://www.excelbanter.com/excel-programming/337805-adodb-connection-string.html)

Nigel C

ADODB Connection String
 
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.


Nigel C

ADODB Connection String
 
SORRY please ignore this - posted to wrong group !



All times are GMT +1. The time now is 02:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com