Exe 在 ADODB.Connection 崩溃并显示“类不支持自动化”
一台具有 MSVBVM60.dll 版本 6.0.97.82 的机器,例如旧机器。其他机器有 MSVBVM60.dll 版本 6.0.98.15,说是新的。从新机器创建的 Exe 在旧机器上的 new ADODB.Connection
行崩溃,出现以下错误
运行时错误“430”:类不支持自动化或不支持 支持预期接口
如何摆脱这个?我的主要目标是在旧机器上运行exe,同时在新机器上创建exe。为了避免干扰新机器的配置,我尝试注销旧版本并在旧机器上注册新版本,但没有成功。 ADODB.Connection 是否使用了任何其他 dll,或者我需要做一些完全不同的事情来摆脱这个问题?
One machine having MSVBVM60.dll ver 6.0.97.82, say OLD. Other machine having MSVBVM60.dll ver 6.0.98.15, say NEW. Exe created from NEW machine crashes at line new ADODB.Connection
on OLD machine giving following error
Run-time error '430': Class does not support Automation or does not
support expected interface
How to get rid of this? My prime objective is to run the exe on OLD machine while created on NEW machine. To avoid disturbing config of NEW machine, I tried to unregister older version and register newer version on the OLD machine but no success. Is there any other dll(s) used by ADODB.Connection
or i need to do something totally different to get rid of this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这与 VB 运行时版本无关,而与 ADO 库有关(如错误行所暗示的那样),并且是由 Microsoft 破坏其 ADO 库中的兼容性引起的。
知识库文章 2517589 解释了原因以及解决方案,本质上是根据兼容性类型库重新编译。
This is nothing to do with the VB runtime versions and more to do with the ADO libraries (as the error line alludes to) and was caused by Microsoft breaking compatability in their ADO libraries.
KB article 2517589 explains why and the solution which is essentially to recompile against the compatability typelib.
在旧机器上修补整个 VB6 运行时可能是最简单的方法 - 您可以从 此处。
VB6 运行时作为包分发,因此我不建议仅插入某些 dll。
我还建议检查您正在运行的两台计算机是否使用相同版本的 MDAC,特别是旧计算机是否安装了项目中引用的版本。
It may be easiest to patch the whole VB6 runtime on the OLD machine - you can get a download from here.
The VB6 runtime distributes as a package so I wouldn't recommend just inserting certain dlls on their own.
I'd also recommend checking that the two machines that you're running are using the same version of MDAC, in particular that the OLD machine has the version installed that is referenced in your project.
接受的答案对我不起作用。以下步骤做到了。
The accepted answer didn't work for me. The following steps did.
“类不支持自动化”。
当使用 64 位版本的 Windows 在 vb 6.0 中编译并尝试在 32 位版本的 Windows 上运行它时,会生成此错误。用 32 位重新编译修复了错误
“Class does not support Automation”.
This error gets generated when compiled in vb 6.0 using 64bit version of windows and attempt to run it on a 32bit version of windows. A recompile with 32bit fixed the error