无法将“System._COMObject"类型的 COM 对象转换为接口类型 [英] Unable to cast COM object of type 'System._COMObject' to interface type

查看:37
本文介绍了无法将“System._COMObject"类型的 COM 对象转换为接口类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 3 个 SSIS 包.三个 SSIS 包中的两个完美运行,第三个.这是第二个的副本,除了更改连接字符串不断抛出问题:

I have 3 SSIS packages. Two out of the 3 SSIS packages work perfectly, the third. Which is a copy of the 2nd one, except changing connection strings keeps throwing the problem:

Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSObject100'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D4E5AF42-7999-473C-8082-6EFC676953C4}' failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).

自从我复制包裹以来,它一直在这样做.我已经按照在线指南运行了 regsvr32 dts.dll,这表明它成功了,但没有任何改变.我仍然收到错误,这是为什么?

It has been doing this ever since I copied the package over. I have followed through online guides and run the regsvr32 dts.dll and this said it was successful but nothing has changed. I still get the error, why is this?

SSIS 包似乎验证了我的容器,与其他两个相比,这样做需要很长时间,然后在验证中失败并抛出上述错误消息.

The SSIS package seems to validate my containers, it takes a long time to do this compared to the other two and then fails later on in the validation throwing the above error message.

推荐答案

您不能只复制包,但您还需要更改名称并生成新的 GUID(用于标识 COM对象)用于此包.查看这篇 MSDN 文章了解更多信息.

You can't just copy the package, but you need additionally to change the name and generate new GUID (which identifies the COM object) for this package. Check this MSDN article for more info.

这篇关于无法将“System._COMObject"类型的 COM 对象转换为接口类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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