Trigger error

  • Hello,

    When I try to compile a trigger that I have created for a table, I get an error 'Cannot use text, ntext, or image columns in the 'inserted' and 'deleted' tables.'

    This is due to the reason that multiple columns in the table have a datatype 'text'. Is there another way of writing this trigger to avoid this error ?#

    The trigger query is as follows:

    -------------------------------------

    GO

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    CREATE Trigger [dbo].[News_Insert]

    On [dbo].[TB_ARTICLE]

    For Insert

    As

    Select * Into #TempA From Inserted

    SET XACT_ABORT OFF

    -------------------------------------------

    Thanks and Regards,

    Paul

  • Change the text columns to varchar(MAX)

  • Ken McKelvey (3/11/2011)


    Change the text columns to varchar(MAX)

    That resolved it !!! Thanks a lot for your solution !!.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply