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:

http://www.redbooks.ibm.com/abstracts/sg246503.html

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

Elvis

Celebrating 11-Years of SQL Performance Excellence on IBM i, i5/OS and
OS/400
www.centerfieldtechnology.com


-----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.


This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2019 by midrange.com 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].