Cannot connect to password encrypted MS Access 2016 database using C#

后端 未结 1 1487
盖世英雄少女心
盖世英雄少女心 2021-01-17 07:58

When I try to connect to a MS Access 2016 database, it connects perfectly without password, but when I try to connect to the same database after encrypting it with a passwor

相关标签:
1条回答
  • 2021-01-17 08:30

    Hope your connection string as follows,

    "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=[Path];Jet OLEDB:Database Password=[Password];"
    

    So, you used Microsoft.ACE.OLEDB.12.0 driver and must be installed on your machine, as it doesn't come with windows. you can find the driver on this link

    And hope this post also help to you. and also this

    How to use access connection strings: https://www.connectionstrings.com/access/

    0 讨论(0)
提交回复
热议问题