验证数据库对象的创建,例如触发器,过程,权限 [英] verify creation of database objects such as triggers, procedures , permissions
问题描述
我正在创建触发器&Winform应用程序中使用SQL Server 2005 Express的表上的过程.
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.
推荐答案
创建XXX ...
后,您可以运行 SELECT OBJECT_ID('XXX')
当然,如果您没有错误,则该对象仍然存在
Of course, if you have no error the object exists anyway
这篇关于验证数据库对象的创建,例如触发器,过程,权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!