MTS commited data when it shouldn't 
Author Message
 MTS commited data when it shouldn't

I have a class. In it I have a function that has 2 updates to 2 different
tables in the database like this:

Public Function Delete()

    On Error GoTo ErrorHandler

    Set adConnection = New ADODB.Connection
    adConnection.Open GetConnectionString()

    SQLStm = "UPDATE ReceiptPO SET Status = " & DELETED
    adConnection.Execute (SQLStm)

    SQLStm = "UPDATE ReceiptItem SET Status = " & DELETED & " WHERE SellerID
= '" & SellerID
    adConnection.Execute (SQLStm)

    Delete = SUCCESS
    Exit Function

    Delete = DB_ERROR
End Function

In the second SQLStm, I deliberately didn't close the quotation after
SellerID (SellerID is string).
When I ran the function from asp (with Transaction=Required; the class is of
type "Uses Transaction".), it did the first update whereas it shouldn't have
done it because of the second update error!!!
Shouldn't MTS roll back all transaction in case of error? Correct me if I'm


Thu, 26 Sep 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. This shouldn't work, but ...

2. It just shouldn't be this complicated...

3. Shouldn't this be easy?

4. Forms taking focus when they shouldn't

5. Please Help: Shouldn't this work?

6. Record Locking Shouldn't Be So Hard

7. EZTouchPOS Why you shouldn't buy it

8. It shouldn't have done that...

9. Textbox beeps and it shouldn't

10. Shouldn't this timer go off?

11. VarType 8192 shouldn't be returned

12. Shouldn't MS combine Access and VB?


Powered by phpBB® Forum Software