VB6 中的 ADODB.Connection - 打开方法失败,运行时错误“2147221164 (80040154)" [英] ADODB.Connection in VB6 - Open Method fails with Runtime Error '2147221164 (80040154)'

查看:561
本文介绍了VB6 中的 ADODB.Connection - 打开方法失败,运行时错误“2147221164 (80040154)"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我正在从事的项目中开始发生的事情,到目前为止我无法找出根本原因.

This is something that start to happen on a project on which I am working, and so far I was not able to figure out the root cause.

这在我这边没有任何变化的情况下停止工作,我知道自上次参与该项目以来唯一发生的变化是磁盘出现故障(曾经是安装了某些应用程序的 E: 驱动器).操作系统为Windows Server 2003.

This stopped working without any change from my side, the only thing I know has changed since the last time I worked on that project is that a disk failed (used to be the E: drive on which some applications were installed). Operative System is Windows Server 2003.

在错误下方:

运行时错误

我添加到项目中的库如下:

The Libraries I am adding to the project are the following:

  • Visual Basic 应用程序
  • Visual Basic 运行时对象和过程
  • Visual Basic 对象和过程
  • OLE 自动化
  • Microsoft CDO for Windows 2000 库
  • 微软脚本运行时
  • Windows 脚本宿主对象模型
  • Microsoft 数据绑定集合 VB6 (SP4)
  • Microsoft ActiveX 数据对象 2.8 库

对象 oConn 的声明和实例化方式如下:

The object oConn is declared and instantiated the following way:

  1. Dim oConn AS ADODB.Connection
  2. 设置 oConn = 新的 ADODB.Connection

在 VB 项目中没有引用标记为 MISSING.

No reference is marked as MISSING in the VB Project.

我也试过后期绑定,但没有成功.我尝试使用regsrv32.exe重新注册msado15.dll,但没有任何乐趣.

I also tried the late binding, but without success. I tried to use regsrv32.exe to reregister msado15.dll, but no joy.

我在这里真的很不明白,我认为由于磁盘故障,某些依赖项不再满足,但鉴于IDE提供的一些细节,我不知道如何调查.

I am really out of idea here, I think that some dependencies are no longer satisfied due to the failure of the disk, but I don't know how to investigate this given the few details provided by the IDE.

谢谢

推荐答案

这个问题没有简单的答案.我发现,并且在@Jim Hewitt 的评论中也提出了建议,Windows Server 2003 上的 MDAC 已损坏.组件检查器实际上无法识别 MDAC 的版本,MDAC 是该版本的 Windows 中的嵌入式组件.因此,总而言之,整个 Windows 安装已损坏(不知道这是如何发生的)并且 Visual Basic 6 无法正常工作.解决方案是设置另一台机器.

This question has no easy answer. What I found, and has been also suggested in the comment by @Jim Hewitt, is that MDAC on Windows Server 2003 was corrupted. The component checker is not actually able to identify the version of MDAC, which is an embedded component in that version of Windows. So, summarizing, the whole windows installation is corrupted (no idea on how this could have happened) and Visual Basic 6 doesn't work properly. The solution has been to setup another machine.

这篇关于VB6 中的 ADODB.Connection - 打开方法失败,运行时错误“2147221164 (80040154)"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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