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

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 pureach 的 blog

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 se

本文关键:COM+ 事务
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top