Re: ADO\SQLServer\Transactions

From: Del Murray (Del.Murray_at_N_S_CreditHawk.Net)
Date: 06/05/04

  • Next message: Mike Shkolnik: "Re: I miss TBatchMove"
    Date: Sat, 5 Jun 2004 14:50:45 -0400
    
    

    just as it is written i think you code is not correct. It depends on what
    type ado object you are using and what lock type.
    If you were issuing sql "insert" statements, they are already done and not
    subject to the control of the transaction. If you are working with a
    recordset, then the code will work as far as where it is **if** locktype was
    batchoptimistic. If optimistic , then the trans is already posted in the
    database and the begin/end should have been done infront of and behind the
    'post' of the recordset row. With optimistic locking, you are too late in
    your code to rollback from and error, if was going to be an error it would
    already have occured.


  • Next message: Mike Shkolnik: "Re: I miss TBatchMove"