Search code examples
sqldatabaseobjectverificationcreation

verify creation of database objects such as triggers, procedures , permissions


I am creating triggers & procedures on a table from a winform application which uses sql server 2005 express.

I want that when the user clicks the create trigger/procedure button, then it creates both the objects & displays on a new Form that triggers & procedures are created with the names and tables on which they are created.

I mean that how do i verify that the objects are created. i want to verify and show it to the user that the objects are created on the so and so table.


Solution

  • After your CREATE XXX ..., you can run SELECT OBJECT_ID('XXX')

    Of course, if you have no error the object exists anyway