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 thetransaction, 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 cleanedup due to a transaction timeout. *** try this *** 1) after calling setabort() raise an error (err.raise) to the caller so they can handlethe 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