ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   connect to access using password (https://www.excelbanter.com/excel-programming/429513-connect-access-using-password.html)

kalle

connect to access using password
 


Hi!

I'm trying to connect to a access db that have a password but with no
luck.

I use this code

Set con = New ADODB.Connection
con.Provider = "Microsoft.ACE.OLEDB.12.0"
con.Open ThisWorkbook.Path & "\file.accdb", "", "password"

con.CursorLocation = adUseClient

What is wrong?

Thanks in advance

*** Sent via Developersdex http://www.developersdex.com ***

Patrick Molloy

connect to access using password
 
is the password actually password? thats a little odd.

"kalle" wrote in message
...


Hi!

I'm trying to connect to a access db that have a password but with no
luck.

I use this code

Set con = New ADODB.Connection
con.Provider = "Microsoft.ACE.OLEDB.12.0"
con.Open ThisWorkbook.Path & "\file.accdb", "", "password"

con.CursorLocation = adUseClient

What is wrong?

Thanks in advance

*** Sent via Developersdex http://www.developersdex.com ***



r

connect to access using password
 
con.Open ThisWorkbook.Path & "\file.accdb", "UserName", "password"
or
con.Open ThisWorkbook.Path & "\file.accdb", , "password"

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


"kalle" wrote:



No password is not the real password.
It is obviously something else.

The question is why it does not work. How to connect to an access
database that has a password?

I have the test locally on my computer and on the network but it makes
no difference.

*** Sent via Developersdex http://www.developersdex.com ***



All times are GMT +1. The time now is 12:23 PM.

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