简体   繁体   English

Microsoft Access运行时引擎64位访问.accdb文件时出现错误

[英]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. 我的应用程序具有访问数据库文件(.accdb),之前我们支持32位MS Access运行时引擎2013年访问文件.accdb 32位版本,到目前为止运行良好。

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" 但是现在我们需要支持64位版本的访问db文件(.accdb),为此,我已经在MS Access 64位版本(通过office 365 pro安装)中创建了一个新的.accdb文件,并从现有数据库中导入了所有表文件到新的数据库文件,并尝试查询数据库,但是最终出现此错误“在本地计算机上未注册'Microsoft.ACE.OLEDB.12.0'提供程序”

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 机器详细信息: Windows 7 64位,MS Office 365专业版64位,MS Access运行时引擎2013 64位版本,选择为32位的构建框架

My application details: 我的申请资料:

  • Running platform : Any CPU 运行平台: 任何CPU
  • .accdb connection string : "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\ApplicationData\\Data\\Temp.accdb;Persist Security Info=True" .accdb连接字符串: “ Provider = Microsoft.ACE.OLEDB.12.0;数据源= C:\\ ApplicationData \\ Data \\ Temp.accdb;持久安全信息= True”

Also I've tried changing provider details like OLEDB.13.0, OLEDB.14.0, OLEDB.15.0, OLEDB.16.0 etc... 我也尝试过更改提供程序的详细信息,例如OLEDB.13.0,OLEDB.14.0,OLEDB.15.0,OLEDB.16.0等。

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". 实际上,我得到的错误是因为我正在使用ACCDB数据库文件的应用程序在32位平台上运行,所以这就是为什么我收到诸如“'Microsoft.ACE.OLEDB.12.0'提供程序没有在本地计算机上注册”。

After updating build platform from 32-bit to AnyCPU, everything working fine. 将构建平台从32位更新为AnyCPU之后,一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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