开发者

To Get Trigger script source from VB6?

开发者 https://www.devze.com 2023-02-13 06:33 出处:网络
I want to get trigger script source from vb6. the database is using sql s开发者_如何学Cerver2000.

I want to get trigger script source from vb6. the database is using sql s开发者_如何学Cerver2000. i have trigger in a table. i just want to get trigger script at run time from vb6. this is possible? if yes please can anybody help me. advance in thanks


You can get all triggers on a table (or view) with something like this

SELECT name FROM sysobjects
WHERE parent_obj = OBJECT_ID('MyTableName') AND xtype = 'TR'

Than you can get source T-SQL of any trigger (or any stored procedure) using this

EXEC sp_helptext 'MyTriggerName'
0

精彩评论

暂无评论...
验证码 换一张
取 消