Home Forums SQL Server 2008 T-SQL (SS2K8) Implicit Update in TRY..CATCH can it become uncommitable RE: Implicit Update in TRY..CATCH can it become uncommitable

  • There should be no need to do all that. More than likely the process is being blocked by some other process, have you checked for blocking? (sp_who2)

    Having said that though, I would get rid of your explicit transactions and rollback stuff code it this way:

    declare @resultMessage

    BEGIN Try

    UPDATE Table1

    SET

    Col1 = @State,

    Col2 = Getdate(),

    Col3 = @Error

    WHERE Col4 = @MessageID

    set @resultMessage = 'SUCCESS'

    END TRY

    BEGIN CATCH

    set @resultMessage = ERROR_MESSAGE()

    END CATCH

    select @resultMessage as Result

    The probability of survival is inversely proportional to the angle of arrival.