MTS Transaction

Results 1 to 2 of 2

Thread: MTS Transaction

  1. #1
    Join Date
    Dec 1969

    Default MTS Transaction

    Hi...<BR>I m using VB COM with MTS in my n-tier application. When I insert Master record it resturns me a Primary key for that. Using that primary key I used to insert my details (no of record inserted in loop). If any of details inset fails I want to abort my hole transaction.

  2. #2
    Join Date
    Dec 1969

    Default RE: MTS Transaction

    OK - assuming you&#039;ve got a full n-tier architecture and that the database operations are being executed by a data component, which is called by some business component, it shouldn&#039;t be too hard...<BR><BR>You need to ensure that the transaction scope is controlled by the business component - this component must be marked as transactional (requires, or requires new). The method call which handles the whole insert process will now be in a transaction. Now, as long as your database component supports transactions (requires or supports), but DOES NOT require a NEW transaction, every call you make to it will be enlisted in the current transaction. Then you just need to call SetComplete or SetAbort in your business logic as appropriate.<BR><BR>Dunc

Posting Permissions

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