| 首页 | 新闻 | 网页 | 设计 | 色彩 | 原创 | 视觉 | 素材 | 动漫 | 酷站 | 策划 | 文案 | 访谈 | 运营 | 编程 | 数据库 | 服务器 | 下载 | 图库 | 
您的位置: 幽幽天空 > 网页 > 编程开发 > VB教程 > 文章正文 用户登录
TOM ULINK新闻联盟
iPlus广告联盟:4
Poco免费提供个人
苏能科技100M/FTP
四亿美金被购 网
ComboBox应用
Flash Com
MOMO源码
XML connector的讨
flashcom中的一般

COM+包含事务的类调用时的-2147164157错误原因和解决           

COM+包含事务的类调用时的-2147164157错误原因和解决

作者:佚名 来源:csdn 作者: pureach 更新:2006-8-25 21:05:35 错误报告 我要投稿
 

COM+包含事务的类调用时的-2147164157错误原因和解决

 

一个需要事务的类每次当创建另一个COM+对象时就出现如下错误:

Method '~' of object '~' failed

错误号:-2147164157

 

调试良久,终不得其解,google新闻组搜索,得到下面信息

 

Error Number: 
   0x8004E003   ( -2147164157 )
Error Description: 
   You made a method call on a COM+ component 
   that has a transaction that has already aborted or 
   in the process of aborting.
 
This can be caused by two things that are known at this time:  
 
1)  SetComplete has been called after SetAbort was already called in the
transaction, and then a method of the object in the transaction is called  
 
2)  The method on the object is called when the transactions has been 
cleaned
up due to a transaction timeout.
 
*** TRY THIS *** 
1)  After Calling SetAbort() raise an error (Err.Raise) to the caller so 
they can handle
the abort correctly  2)  Increase the transaction timeout for long queries, 
or updates.
 
According to your description, you are pretty sure Child calls SetAborts 
and Parent calls SetAborts. However its important to manually raise the 
error from the child using Err.Raise after calling SetAbort.
 
Also, if you are using W2K, install SP1

 

 

以上信息似乎对我还是没有用,突然间我想到COM+的事务管理不支持嵌套,那么会不会在不同的包(package)之间其事务边界(bound)已经失效呢?因为我为了安装代理包方便,把组件按照功能和类型放在了不同的COM+应用程序中,这样的话就有了跨包(package)的调用和创建对象,当不使用事务时,没有什么问题;一旦在事务中调用和创建,便出现如上错误。我原来也碰到过这个情况,当时以为是COM+的事务不支持跨计算机的调用,现在终于明白了。

 

解决方法:把组件全部放在一个包内,调试通过。

文章录入:skyuu    责任编辑:skyuu 
  • 上一篇文章:

  • 下一篇文章:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    发表评论:
    姓名:  评 分: 1分 2分 3分 4分 5分
     
  • 严禁发表危害国家安全、政治、黄色淫秽等内容的评论。
  • 用户需对自己在使用幽幽天空服务过程中的行为承担法律责任。
  • 本站管理员有权保留或删除评论内容。
  • 评论内容只代表机友个人观点,与本网站立场无关。