MTS Doubt

Results 1 to 3 of 3

Thread: MTS Doubt

  1. #1
    Dharma Guest

    Default MTS Doubt

    Hi there!<BR> I have 10 ASP pages, (all use the same database-but each page using a different table in the database). After going through all the 10 pages, the user is redirected to a page, which contains &#039;Commit&#039; and &#039;Cancel&#039; butttons. If the user clicks the Commit button, all the information enetered in those forms needs to be committed. On the other hand if he chooses the Cancel button, all the information entered should be rollbacked.<BR> So I used the MTS. In the very first page, I have used &#060;%@transaction=requires_New %&#062; and in all other pages, I have given &#060;%@transaction=Supported %&#062;. In the 11th page, if the user clicks the &#039;Cancel&#039; button, I am calling the ObjectContext.SetAbort method. If the user clicks the &#039;Commit&#039; button, I am calling the ObjectContext.SetComplete method.<BR> I thought this will work fine. But to my surprise, what the MTS is doing is it calls the SetAbort/SetComplete methods of ObjectContext at the end of the everypage.<BR> I am using a SQL-Server database. What should I do to get the desired result? Please, please help me. <BR><BR>Thanx in Advance.<BR>Dharma.

  2. #2
    Dharma Guest

    Default RE: MTS Doubt

    Can Anybody help me?<BR><BR>Dharma.

  3. #3
    Join Date
    Dec 1969

    Default RE: MTS Doubt

    You have a fundamental misunderstanding of MTS and ASP.<BR><BR>There is no way that a sinlge MTS transaction can span multiple ASP pages, because each request is handled seperately.<BR><BR>The easiest way to handle this sort of situation is to place the data into a staging table as the user moves from page to page, and then move it into the final table at the end of the process (if the user selects OK) or delete it (if they select cancel).<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