问题描述
我在将VBScript连接到访问MDB数据库时遇到问题.我的平台是Vista64,但是那里的大多数资源都用于ASP/IIS7.
I've having a problem with a VBScript connecting to an access MDB Database. My platform is Vista64, but the majority of resources out there are for ASP/IIS7.
很简单,我无法连接它.我收到以下错误:800A0E7A-找不到提供程序.它可能未正确安装"
Quite simply, I can't get it to connect. I'm getting the following error:800A0E7A - "Provider cannot be found. It may not be properly installed"
我的代码是:
Set conn = CreateObject("ADODB.Connection")
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\database.MDB"
conn.Open strConnect
到目前为止,我已经运行%WINDIR%\ System32 \ odbcad32.exe尝试将驱动程序配置为32位模式,但是还没有解决问题.任何建议将不胜感激
So far I have ran %WINDIR%\System32\odbcad32.exe to try to configure the Driver in 32bit mode, but it hasn't done the trick. Any suggestions would be greatly appreciated
另外,我正在尝试通过双击并使其运行来使此.vbs脚本运行.该代码未嵌入到其他lang/script中.
Just as an addition, I'm trying to get this .vbs script to run by double clicking and letting it do it's thing. This code isn't embedded into another lang/script.
推荐答案
运行 SysWOW64 版本的脚本
C:\ Windows \ SysWOW64 \ wscript.exe或cscript
而不是C:\ Windows \ System32
run script with SysWOW64 version
C:\Windows\SysWOW64\wscript.exe or cscript
instead of the default 64bit version from C:\Windows\System32
这篇关于VBScript&访问MDB-800A0E7A-“找不到提供者.它可能未正确安装".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!