• Phil Parkin (9/28/2016)


    Rechana Rajan (9/28/2016)


    The transaction is not getting commited or rollback when run in different db. The execution might throw error but its not commiting for below

    BEGIN TRY

    BEGIN TRANSACTION

    UPDATE dbo.test

    SETArrival= '20160928 11:30:00 AM',

    Departure= '20160928 12:00:00 PM'

    WHERE

    ID= 1;

    COMMIT

    END TRY

    BEGIN CATCH

    IF @@TRANCOUNT > 0

    ROLLBACK

    END CATCH

    OK. What is your question, exactly?

    Please post the full text of the error message, too.

    Thanks Phil for the reply. What to know why the transaction is not commiting . Got below error while executing but the transaction will be in uncommited state.

    Msg 208, Level 16, State 1, Line 3

    Invalid object name 'dbo.test'.