Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Error 21001, error while writing triggers

Error 21001, error while writing triggers

Scheduled Pinned Locked Moved Database
databasequestionhelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    v1i9n6o7d
    wrote on last edited by
    #1

    Hi, A very newbie question to all you learned folks. I am writing a trigger through Enterprise Manager (using the option New Stored Procedure...) The following is my code

    create trigger trig1 on table1
    for insert
    as
    select * from table2
    go

    When I check the syntax by pressing the Check Syntax button it says Syntax Ok but when I press the OK button to close the stored procedure editor it states the following error

    Error 21001:[SQL-DMO]Stored Procedure definition must include name and text (for StandardStoredProcedure or library name for ExtendedStoredProcedure)

    Now the stupid question, how do I write a trigger through SQL Enterprise Manager for a particular table.:mad:

    C W 2 Replies Last reply
    0
    • V v1i9n6o7d

      Hi, A very newbie question to all you learned folks. I am writing a trigger through Enterprise Manager (using the option New Stored Procedure...) The following is my code

      create trigger trig1 on table1
      for insert
      as
      select * from table2
      go

      When I check the syntax by pressing the Check Syntax button it says Syntax Ok but when I press the OK button to close the stored procedure editor it states the following error

      Error 21001:[SQL-DMO]Stored Procedure definition must include name and text (for StandardStoredProcedure or library name for ExtendedStoredProcedure)

      Now the stupid question, how do I write a trigger through SQL Enterprise Manager for a particular table.:mad:

      C Offline
      C Offline
      Caio Kinzel Filho
      wrote on last edited by
      #2

      What are you really trying to create? A trigger or a Stored Procedure?

      Intelligence is almost useless for those who have nothing else! Email: caiokf@gmail.com

      1 Reply Last reply
      0
      • V v1i9n6o7d

        Hi, A very newbie question to all you learned folks. I am writing a trigger through Enterprise Manager (using the option New Stored Procedure...) The following is my code

        create trigger trig1 on table1
        for insert
        as
        select * from table2
        go

        When I check the syntax by pressing the Check Syntax button it says Syntax Ok but when I press the OK button to close the stored procedure editor it states the following error

        Error 21001:[SQL-DMO]Stored Procedure definition must include name and text (for StandardStoredProcedure or library name for ExtendedStoredProcedure)

        Now the stupid question, how do I write a trigger through SQL Enterprise Manager for a particular table.:mad:

        W Offline
        W Offline
        Wendelius
        wrote on last edited by
        #3

        If you're creating a trigger, don't use New Stored Procedure in the management studio, instead: - navigate to the table you want to create the trigger on - expand the tree - select Triggers - and then New Trigger option. Mika

        The need to optimize rises from a bad design

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups