且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ADODB.Connection错误:800A0E7A

更新时间:2022-10-17 22:18:48

嗨RutsT,


根据您的描述,您安装了Access 2010 ,但在您的代码中,您使用了Microsoft.ACE.OLEDB.12.0。据我所知,Access 2010的提供者是Microsoft.ACE.OLEDB.14.0,而Microsoft.ACE.OLEDB.12.0是Access 2007的提供者。你
安装AccessDatabaseEngine.exe我 ndependently?我建议您使用14.0而不是12.0。


此外,我建议您按照以下方式检查机器中可用的提供程序。

1.转到控制面板

2.转到管理员工具

3.转到数据源(ODBC)

4.单击"驱动程序"; tab。


***的问候,


Edward


I'm coding a ruby script that has to write data in an existing Access Database. With following code I don't manage to make a connection with the database: 

require 'win32ole'
connection = WIN32OLE.new('ADODB.Connection')
connection.Open('Provider=Microsoft.ACE.OLEDB.12.0;Data Source=d:\ex1_student.mdb')

Error: 800A0E7A - "Provider cannot be found. It may not be properly installed." 

Access 2010 32-bit and Windows 10 64-bit OS. I did find questions with the same error, but the solutions doesn't seem to apply for me.

Hi RutsT,

Based on your description, you installed Access 2010, but in your code, you used Microsoft.ACE.OLEDB.12.0. As far as I know, the provider of Access 2010 is Microsoft.ACE.OLEDB.14.0, and the Microsoft.ACE.OLEDB.12.0 is the provider of Access 2007. Do you install the AccessDatabaseEngine.exe independently? I suggest you use 14.0 instead of 12.0.

In addition, I suggest you do as below to check the provider available in your machine.
1.Goto Control Panel
2.Goto Administrator Tools
3.Goto Data Sources (ODBC)
4.Click the "Drivers" tab.

Best Regards,

Edward