Re: Trigger calling Store Procedure
Posted in 1997
Ray Anderson <ray2@flash.net> wrote in article <5kg9ms$ob4$1@excalibur.flash.net>... > > I created a trigger which calls a store procedure and the store > procedure was to check exception handling. The problem is that the > trigger does not really have the capability to receive the > return status from the store procedure. The following was > an example: > ... snip ... > The problem is that any insert into the iialg table fails > with an error 684, since the procedure returns a value ant the trigger > is not designed to receive one. > Is there any way around this problem short of Not checking/returning > a value fromn the store procedure? > You need to use RAISE EXCEPTION You can use one of two standard sql error numbers, but more usefully, you can return your own error number and message text. The trigger will know how to handle this. I found this is the back of the SQL Manual for On-Line 5.