Unrecognized database format'C:\…\Employees.accdb for Microsoft Access Database File?

前端 未结 2 1387
不知归路
不知归路 2020-12-14 19:58

I am trying to access a file stored in a Microsoft Access database. (I am working in Visual Studio 2012) I chose the Database source type, and the Dataset database model, w

相关标签:
2条回答
  • 2020-12-14 20:06

    Your computer is missing Microsoft.ACE.OLEDB.12.0

    You can get it from here: http://www.microsoft.com/en-us/download/details.aspx?id=13255

    0 讨论(0)
  • 2020-12-14 20:29

    I know this is a bit old but if anyone else has the same problem, this worked for me.

    According to your description, I create a sample VB project and try connect to the Access 2016 database and I get the same result with you. Then I try to connect old version of Access database and it is successful.

    I find the Provider that used to connect the old version is Microsoft.Jet.OLEDB.4.0. But for Access 2016 database, we should use Microsoft.ACE.OLEDB.12.0. So we need to install Microsoft Access Database Engine 2010 Redistributable and 2007 Office System Driver: Data Connectivity Components, which will help us install and register Microsoft.ACE.OLEDB.12.0 to our local machine.

    Then please connect the Access 2016 database with following steps.

    Add New Data Source --> database --> Dataset --> New Connection --> Microsoft Access Database File --> select the accdb file -> Click Advanced button to change the Provider. Then click the OK button back to the Add connection windows and Test connection, it will succeed.

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