(2) No. Only after-triggers.
(3) Constraints are checked before triggers. The constraint will halt the
command and the trigger will never execute. Remove the constraint or do the
modification through stored procedures and perform the "cascading" function
in you stored procedure.
There exist a knowledgebase article regading this subject, but I don't
remember it's number. Hopefully someone else might post the number here...
Instructor (MCT, MCSE, MCSD)
Cornerstone Sweden AB
Quote:> I'm sorry if these are stupid questions.
> (1)Can I change foreign key Delete-Rule
> to "CASCADE changes to foreign key"?
> (2)Can SqlServer triggers be used like
> QRACLE such as "BEFORE/AFTER insert"?
> (3)How to CASCADE delete to foreign key
> using triggers?
> Every time I'll receive an error when
> I deleted a record which contain a
> primary-key.The trigger will not execute
> before delete.
> Thanks in advance.