Hi guys and gals; <BR><BR>I have a question about MTS and VB COM objects. <BR>In the code sample below I have a sub called modifydatabase() that does 3 database transactions before ending. (insert, insert, update) <BR><BR>If one of of those transactions were to fail, (either 1st, 2nd 3rd), I would like it to roll back all those transactions.<BR>Can someone please tell me if code below would in fact do this. <BR><BR>If not could someone tell me the proper solution to make it roll back all if 1 fails. I want this to be all or nothing. <BR><BR>stephen<BR><BR><BR> Implements ObjectControl<BR><BR>Private objContext As ObjectContext<BR>Option Explicit<BR><BR>Private Sub ObjectControl_Activate()<BR> Set objContext = GetObjectContext()<BR>End Sub<BR><BR>Private Function ObjectControl_CanBePooled() As Boolean<BR> ObjectControl_CanBePooled = True<BR>End Function<BR><BR>Private Sub ObjectControl_Deactivate()<BR> Set objContext = Nothing<BR>End Sub<BR><BR><BR>Public Sub modifydatabase()<BR><BR>On Error GoTo ErrHandler<BR><BR>Dim objResponse As Response<BR>Dim str_sqlInsert1 As String<BR>Dim str_sqlInsert2 As String<BR>Dim str_sqlUpdate3 As String<BR><BR>Set objResponse = objContext("Response")<BR><BR>&#039;************** *****<BR>objContext.BEGINTRAN<BR>&#039;*********** ********<BR><BR>str_sqlInsert1 = "INSERT INTO Table1 VALUES (1,2,3,4,5,6,7,8,9,10) " <BR><BR>str_sqlInsert2 = "INSERT INTO Table2 VALUES (1,2,3,4,5,6,7,8,9,10) " <BR><BR>str_sqlUpdate3 = "UPDATE Table3 SET Field1=&#039;field1&#039;, Field2=&#039;field2&#039; Field3=&#039;field3&#039; WHERE field4=434"<BR><BR><BR>objResponse.Write "Each transaction was successful"<BR>objContext.SetComplete<BR><BR>modif ydatabaseExit:<BR> If Not (objResponse Is Nothing) Then<BR> Set objResponse = Nothing<BR> End If<BR> <BR><BR>End Sub<BR><BR>ErrHandler:<BR> objContext.RollBack &#039;*****IS this necessary if I have setAbort to rollback ?? <BR><BR> App.LogEvent Err.Number & " " & Err.Source & " " & Err.Description & " " & "page name "<BR> objResponse.Write "This was not successful and everything was rolled back."<BR> objContext.SetAbort<BR> Resume modifydatabaseExit<BR>End Sub