简体   繁体   中英

Microsoft Access runtime engine 64-bit giving error while accessing .accdb file

My application have access database file (.accdb) and earlier we supported access file .accdb 32-bit version with MS Access runtime engine 2013 32-bit which is working fine till now.

But now we need to support access db file (.accdb) 64-bit version, for that I've created a new .accdb file in MS Access 64-bit version(installed through office 365 pro) and imported all tables from existing db file to new db file and tried to query the db, but ended up with this error "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine"

Below are the complete details:

Machine details: Windows 7 64-bit, MS Office 365 pro 64-bit, MS Access runtime engine 2013 64-bit version, Build Framework selected as 32-bit

My application details:

  • Running platform : Any CPU
  • .accdb connection string : "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\ApplicationData\\Data\\Temp.accdb;Persist Security Info=True"

Also I've tried changing provider details like OLEDB.13.0, OLEDB.14.0, OLEDB.15.0, OLEDB.16.0 etc...

I've tried all the ways but don't know why I'm getting this provider is not registered error.

Thanks for everyone for the help. Finally I've found the issue for my problem.

Actually the error I'm getting here is because the application that I'm using ACCDB database file is running on 32-bit platform and that's why I'm getting error like "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine".

After updating build platform from 32-bit to AnyCPU, everything working fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM