Excel ADODB VBA error msg 'Not a Valid Password'

后端 未结 2 1149
既然无缘
既然无缘 2020-12-07 03:05

I am trying to open a Connection to Password protected AccessDB, through Excel VBA.

I am using the following connection string

conn.Provider = \"Mic         


        
相关标签:
2条回答
  • 2020-12-07 03:36

    In Access 2010 the encryption method changed for database passwords, and the ADO provider's "Jet OLEDB:Database Password" keyword does not appear to work with the new method. Here, I had to remove the password, go into Access->File->Options->Client Settings->Advanced and check "use legacy encryption", then recreate the password.

    I do not know if there are any new OLE DB connection string keywords for the ACE provider or whether this problem also occurs when using ADO.NET

    0 讨论(0)
  • 2020-12-07 03:46

    Or you could do this.

        conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & dbPath & ";Jet OLEDB:Database Password=" & pwd
    
    0 讨论(0)
提交回复
热议问题