MTS rollback in different components

Results 1 to 2 of 2

Thread: MTS rollback in different components

  1. #1
    milind Guest

    Default MTS rollback in different components

    i&#039m using one COM which calls two other COMs each of them inserting data in a header and detail table resp. <BR>if any error happens in any component that components errorhandler rollbacks THAT COMPONENTS sqls. <BR>how to rollback the SQLs of the header COM when there is an error in the detail COM ? <BR><BR>like when there is some error in detail COM,not only the sql in that coponent should be rolled back but the SQLs of header COM should also roll back . <BR>how to tackle this ? pl. help urgently thanks in advance milind

  2. #2
    Karin van Ettinger Guest

    Default RE: MTS rollback in different components

    the component that starts the transaction - I suppose that will always be the same, otherwise you need a redesign - must be defined as requiresNewTransaction. The other components must be defined as RequiresTransaction.<BR><BR>use objectcontext as follows<BR>dim oc as objectcontext<BR>set oc = getobjectcontext()<BR><BR>create the components as follows:<BR>set obj2 = oc.CreateInstance("ProgID van obj2")<BR><BR>if anything goes wrong abort the transaction by the statement<BR>oc.setAbort<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts