打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
ADODB.Connection Automation Error
ADODB.Connection Automation Error
P: 10
ricovox
Hello,
Every time I try to create an ADODB.Connection object, I receive the following error:
-----------
Runtime Error '-2147024703 (800700c1)':
Automation error
%1 is not a valid Win32 Application.
-------------
I am running Windows 7 Ultimate (64 bit).
This IS NOT a connection string problem, nor is it application-specific.
I can easily reproduce the error in a number of ways:
(Method 1 VB or VBA Direct Reference)
Using visual basic 6 IDE OR Microsoft Office VBA IDE, add a reference to Microsoft ActiveX Data Objects (I have tested versions 2.6, 2.7, 2.8, and 6.0). Add a code module with the following code:
Expand|Select|Wrap|Line Numbers
Dim oConn As ADODB.Connection
Set oConn = New ADODB.Connection
I Run the exe (VB6) or macro (VBA) and get the error described above. Note that I have tried each version of ADO listed above individually, and receive the same error on all versions.
(Method 2 VB or VBA CreateObject)
Using visual basic 6 IDE OR Microsoft Office VBA IDE, add a code module with the following code:
Expand|Select|Wrap|Line Numbers
Dim oConn As Object
Set oConn = CreateObject("ADODB.Connection")
I Run the exe (VB6) or macro (VBA) and get the error described above. (Note that no versions of ADO are added as references.)
(Method 3 WSH) Create a wsh vbs script with the following code:
Expand|Select|Wrap|Line Numbers
dim obj: set obj = wScript.CreateObject("ADODB.Connection")
(The error message in this case is slightly different, but the number (800700c1) is the same.)
Clearly, the above 3 methods show that this error is not related to a specific application etc. but is instead a problem with ADO itself or the installation of MDAC/Windows DAC on my machine. Perhaps it is some conflict of ADO with a 64bit machine.
Can anyone confirm using Windows 7 Ultimate with VB6 professional installed whose ADO IS working?
Can anyone suggest how I might go about repairing Windows DAC 6.0? I have not found a way to do so in any forum I have checked.
Thanks for any help and suggestions you can offer!
Apr 27 '10 #1
Post Reply
Share this Question
5 Replies
P: 3
laurin1
Did you ever get this figured out? I'm having a similar problem.
Jun 21 '10 #2
reply
P: 10
ricovox
@laurin1
Sorry, but no. I am still having the problem, and no one has offered suggestions for fixing it. :-(
Jun 21 '10 #3
reply
P: 3
laurin1
Well, I did figure mine out, however, I'm running this in AutoIt (scripting engine.) Mine was a call I make do disable the 64 bit redirection for another part of the script. I moved my ADODB call above that and it works great. Since you are on 64 bit as well, I'd bet money that it's a 64 bit problem.
Jun 21 '10 #4
reply
P: 10
ricovox
@laurin1
Thanks. Can you tell me a little bit more about what you mean by "disable the 64 bit redirection"? For example, what AutoIt script command does this refer to?
Thanks,
Richard
Jun 21 '10 #5
reply
P: 3
laurin1
@ricovox
I doubt the exact problem I had is yours as well, but the problem I had is similar in that redirect being disabled mean that the object creation could not occur, because it could not find the ADODB files.
The registry key that controls that is here:
Wow64DisableWow64FsRedirection
Do you understand that 64 bit Windows works with 32 bit applications by using WOW (Windows on Windows)? That need it redirects calls to certain parts of the file system and to the Registry coming from 32 bit applications to special folders and registry locations?
c:\Program Files (x86)
c:\Windows\SysWow64
HKLM\Software\SysWow64
Jun 21 '10 #6
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
VB+ADO:介绍的Connection对象的应用方法
VB 中 ADO、 ADODB、 ADODC 的区别与联系(皮毛)
windows server 2008 ado 操作做数据 CreateInstance("ADODB.Connection"); 失败
Excel 用ADO调用ACCESS时应注意的SQL语句书写方法 - Microsoft ...
还是VB的错误430问题
VB通过ADO连接SQL数据的两种方法
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服