## CSDN博客

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

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

Method '~' of object '~' failed

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

0 0