You'll need to send an escape message to communicate to the DB2 (and
indirectly your end user) that you do not want this record
inserted/updated/deleted. See 11.3 section (Trigger feedback to application
programs) in this redbook:

It illustrates how DB2 handles the exception and what the final error
message is.


Celebrating 11-Years of SQL Performance Excellence on IBM i, i5/OS and

-----Original Message-----
Subject: Re: Trigger question -- really batting a thousand

The easiest way to veto a change from a "before" trigger is what? Cause
the trigger program to fail with a fatal error? I know I have an example
of a trigger program that vetoes everything unconditionally (I wrote one
to exercise QuestView's trigger veto detection feature some years ago),
but I can't remember what it did, or where I put it.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.