i want to know how can we create simple trigger in sql server 2000 and how to call from asp.net .
complete code for it will be verry helpfull.
i want to know how can we create simple trigger in sql server 2000 and how to call from asp.net .
complete code for it will be verry helpfull.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Posted Aug 2, 2007, 1:49 AM EDT
Triggers automatically fires, when you perform any operations on the table. U can write triggers for Insert,Update and delete.
There are two types of trigger u can write.
1. After
2. Instead of
By default it is after. I am writing some code for creating trigger.
CREATE TRIGGER MySample ON [TableName] FOR DELETE AS IF (SELECT state FROM deleted) = ‘SomeValue’ BEGIN PRINT ‘Can not remove customers from SomeValue’ PRINT ‘Transaction has been canceled’ ROLLBACK ENDIt's the after trigger.
I think it will help you.
abhishek trivedi112 reputationPosted Sep 18, 2007, 1:25 AM EDT
i know how to create trigger but i want to know how to call them from asp.net web application?
thank you,