ADODB.Connection错误:800A0E7A [英] ADODB.Connection error : 800A0E7A

查看:104
本文介绍了ADODB.Connection错误:800A0E7A的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个必须在现有Access数据库中写入数据的ruby脚本。使用以下代码,我无法与数据库建立连接: 

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

错误:  800A0E7A - "无法找到提供商。它可能未正确安装。" 


访问2010 32位和Windows 10 64位操作系统。我确实发现了同样错误的问题,但解决方案似乎并不适用于我。

解决方案

嗨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


这篇关于ADODB.Connection错误:800A0E7A的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆