Passing Autumn

The same 3 years, and some people from students to as the MVP, and I was in place, then the code to show off the autumn wind, a little sad, a little cool!

公告信息
Content is very powerful ~ ~ ~ ~ ~ ~ Do not look outside the invasion not as sharp and brother, I felt kind of sense of loss ~ ~ ~

解决DAO的DBEngine引发的COM 对象强制转换为接口类型错误

今天在使用CYQ.DBImport将数据从access导向另一个Access的时候,莫名的报错,提示以下错误信息:

无法将类型为“DAO.DBEngineClass”的 COM 对象强制转换为接口类型“DAO._DBEngine”。此操作失败的原因是对 IID 为“{00000021-0000-0010-8000-00AA006D2EA4}”的接口的 COM 组件调用 QueryInterface 因以下错误而失败: 不支持此接口 (异常来自 HRESULT:0x80004002 (E_NOINTERFACE))。

纠结了好久,上网搜了好多信息与资料,一度调试追踪,过程太辛酸,不多扯了,最后发现:

C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll

这个dao360.dll是罪之所在,以前都没啥问题,今天就出问题了,考虑到以前可能安装或卸载过某些软件可能会对此影响,因此重新注册了一下dll,问题竟然就解决了。

注册com dll代码:

regsvr32 "C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll

把这代码放到cmd命令里运行一下就好了。

纠结的心终于轻松了,这纠结花了我好几个小时了。

Autumn Park is QBlog the official site, created by the passing autumn, based on the framework data layers developed cyqdata support multi-user, multi-language, multi-database (access, mssql, oracle), directory level url and other powerful blog system
新浪微博粉丝精灵,刷粉丝、刷评论、刷转发、企业商家微博营销必备工具"

2011/9/2 9:00:49 | dev | |

  • 发表评论