Purchasing.uShipMethod Trigger

Information

NamePurchasing.uShipMethod
Table NamePurchasing.ShipMethod
Created14.10.2005. 1:59:56
Modified2.7.2009. 10:35:10
Disabled 
For replication 
Instead of trigger 
Activates onUPDATE

SQL Script

CREATE TRIGGER [Purchasing].[uShipMethod] ON [Purchasing].[ShipMethod] 
AFTER UPDATE NOT FOR REPLICATION AS 
BEGIN
    SET NOCOUNT ON;

    BEGIN TRY
        UPDATE [Purchasing].[ShipMethod]
        SET [Purchasing].[ShipMethod].[ModifiedDate] = GETDATE()
        FROM inserted
        WHERE inserted.[ShipMethodID] = [Purchasing].[ShipMethod].[ShipMethodID];
    END TRY
    BEGIN CATCH
        EXECUTE [dbo].[uspPrintError];

        -- Rollback any active or uncommittable transactions before
        -- inserting information in the ErrorLog
        IF @@TRANCOUNT > 0
        BEGIN
            ROLLBACK TRANSACTION;
        END

        EXECUTE [dbo].[uspLogError];
    END CATCH;
END;