Forum Replies Created

Viewing post 16 (of 16 total)

  • RE: Update with Lock

    This is the cose:

    from session number 1:

    BEGIN TRY

    BEGIN TRANSACTION

    update TEST set A=1 where A=2;

    COMMIT TRANSACTION

    END TRY

    BEGIN CATCH

    IF (XACT_STATE()) = -1

    BEGIN

    ROLLBACK TRANSACTION

    END

    IF (XACT_STATE()) = 1

    BEGIN

    COMMIT TRANSACTION

    END

    END...

Viewing post 16 (of 16 total)