简体   繁体   English

Microsoft Office 12.0 Access 数据库引擎 OLE DB 提供程序

[英]Microsoft Office 12.0 Access database engine OLE DB Provider

System : Windows 10 64 bit系统:Windows 10 64 位

Programs installed :安装的程序:

  • Visual Studio 2019视觉工作室 2019
  • MS Office 2019 64 bit微软 Office 2019 64 位
  • Microsoft Access database engine 2010 32bit Microsoft Access 数据库引擎 2010 32 位

Connection doesn't succeed between C# and Access database. C# 和 Access 数据库之间的连接不成功。

Error message:错误信息:

Microsoft Office 12.0 Access database engine OLE DB Provider. Microsoft Office 12.0 Access 数据库引擎 OLE DB 提供程序。

How to successfully connect without uninstalling the Microsoft Access Database Engine 2010 32bit?如何在不卸载 Microsoft Access Database Engine 2010 32bit 的情况下成功连接?

A few things: You mention that you have office x64 bits, but you don't mention or note if that version of office has Access included - it might not.一些事情:您提到您有 office x64 位,但您没有提到或注意该版本的 office 是否包含 Access - 可能没有。 You also mention that you have Access x32 bits installed.您还提到您安装了 Access x32 位。 The BIG question then is are you wanting to run your .net application as x32, or x64?那么最大的问题是您希望将 .net 应用程序作为 x32 还是 x64 运行?

By default, if your .net project is "ANY CPU" or x86, then your code will run as x32, and thus the installed x32 bit version of ACE from Access 2010 should work - but only if your CPU choice for .net is "ANY" or x86.默认情况下,如果您的 .net 项目是“任何 CPU”或 x86,那么您的代码将作为 x32 运行,因此从 Access 2010 安装的 x32 位版本的 ACE 应该可以工作 - 但前提是您为 .net 选择的 CPU 是“任何”或 x86。

If you need or want to use a x64 bit process?如果您需要或想要使用 x64 位进程? Well, the you have to install the ACE/office connectivity package from office.好吧,您必须从 office 安装 ACE/office 连接包。 In fact EVEN if your office install includes Access 2016 or 2019, you STILL MUST install the ACE data engine.事实上,即使您的办公室安装包括 Access 2016 或 2019,您仍然必须安装 ACE 数据引擎。 For 2010 you don't need a separate install of ACE, but for 2016 and later, you do have to separate install ACE.对于 2010 年,您不需要单独安装 ACE,但对于 2016 年及更高版本,您必须单独安装 ACE。

Also keep in mind if you are forcing and running your .net project as x64 bits, then the test connection inside of Visual Studio will fail, since it is a x32 bit process.还请记住,如果您以 x64 位强制和运行 .net 项目,那么 Visual Studio 内部的测试连接将失败,因为它是一个 x32 位进程。 (VS is a x32 bit program - so you can use connection builders in VS, but the test connection will fail for 64 bits, but running the program (even as debug) will run as x64 bits and you should/can use ACE x64 bits if its been installed. So just keep in mind that for x64 bits, the "test" connection inside of VS will not work. But running the code will. (VS 是一个 x32 位程序 - 因此您可以在 VS 中使用连接构建器,但测试连接将失败 64 位,但运行该程序(即使作为调试)将以 x64 位运行,您应该/可以使用 ACE x64 位如果它已安装。所以请记住,对于 x64 位,VS 内部的“测试”连接将不起作用。但运行代码会。

As noted, if you trying to use x32 bits then force your VS project to x86, and test.如前所述,如果您尝试使用 x32 位,则将您的 VS 项目强制为 x86,然后进行测试。 Access 2010 ACE should be available. Access 2010 ACE 应该可用。 If it is not, then I would do a repair on the 2010 install - it may have been damaged or messed up by installing a later version of office.如果不是,那么我将对 2010 安装进行修复-安装更高版本的 office 可能已损坏或弄乱了它。

暂无
暂无

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

相关问题 解决“Microsoft.ACE.OLEDB.12.0”提供程序问题,而无需安装“Microsoft Access数据库引擎” - Solve “Microsoft.ACE.OLEDB.12.0” provider issue without installing “Microsoft Access Database Engine” 如何解决OLE DB访问接口Microsoft ACE OLEDB 12.0对于链接服务器(空)的错误? - How to resolve OLE DB provider Microsoft ACE OLEDB 12.0 for linked server (null) error? Jenkins使用C#上的Access DataBase Engine构建Selenium测试,获取Microsoft.ACE.OLEDB.12.0'提供程序未在本地计算机上注册 - Jenkins build with Access DataBase Engine on C# for Selenium Tests,Getting Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine 将Excel工作表导入SQL Server获取错误“OLE DB提供程序”Microsoft.ACE.OLEDB.12.0“用于链接服务器”(null)“” - Import Excel Sheet into SQL Server Getting Error “The OLE DB provider “Microsoft.ACE.OLEDB.12.0” for linked server “(null)”” 连接到我的网站的访问数据库时,未注册Microsoft.ace.oledb.12.0提供程序 - Microsoft.ace.oledb.12.0 provider is not registered while connecting to access database to my website Microsoft Office Access 数据库引擎无法打开或写入文件 - The Microsoft Office Access database engine cannot open or write to the file Microsoft Office Access 数据库引擎无法打开或写入文件 '' - The Microsoft Office Access database engine cannot open or write to the file '' 使用OLE DB .NET Provider插入数据库表将不起作用 - Insert into database table with OLE DB .NET Provider won't work 尝试查询Excel文件时出现问题…“ Microsoft Office Access数据库引擎找不到对象'Sheet1 $'。” - Issue attempting to query an Excel file… “The Microsoft Office Access database engine could not find the object 'Sheet1$'..” Microsoft Office Access数据库引擎找不到对象“ PPR_Status_Detailed” - The Microsoft Office Access database engine could not find the object 'PPR_Status_Detailed'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM