Re: Error Handling Coming Out of a Trigger



Brian,

Try raising the exception, then rolling back the transaction.

krf

"Brian Hollister" <bhollisterATfuturaintlDOTcom> wrote in message
news:46795ad0$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi,


I have an after update trigger on a table. This trigger is used to help
enforce a business rule of not allowing a zero quantity.

I have the following code in the body of the trigger. I had expected that
it
would have caused an exception in the calling application; because i am
using the RAISERROR statement. I also tried several different severity
levels but none worked for me. I get nothing back at all, no message and
certainly no exception.


.



Relevant Pages

  • "on exception" statement not firing within stored procedure when called from trigger
    ... I am experiencing a problem whereby ON EXCEPTION statements are ... not firing within stored procedures when the stored procedures ... are invoked from a trigger. ... create table tBar ) lock mode row; ...
    (comp.databases.informix)
  • Re: Error Handling Coming Out of a Trigger
    ... http://www.oledbdirect.com - The fastest way to access MS SQL Server, ... I have an after update trigger on a table. ... would have caused an exception in the calling application; ... FErrorMessage:= ...
    (borland.public.delphi.database.ado)
  • Re: [RFC] hwbkpt: Hardware breakpoints (was Kwatch)
    ... meaning that neither notifier will return NOTIFY_STOP. ... If it's a ptrace exception it also ... as a special case for a ptrace trigger. ...
    (Linux-Kernel)
  • Re: "record not found or changed by another user"
    ... > Sporadically we will get an exception in ApplyUpdates: ... So a trigger that attempts an insert/update but doesn't, ... INSERT INTO ChangeHistory ...
    (borland.public.delphi.database.ado)
  • Error Handling Coming Out of a Trigger
    ... I have an after update trigger on a table. ... enforce a business rule of not allowing a zero quantity. ... would have caused an exception in the calling application; ... FErrorMessage:= ...
    (borland.public.delphi.database.ado)