Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with Form_Trigger_Failure in Key-Commit trigger

444 views
Skip to first unread message

阿湯 Thenardier

unread,
Jan 16, 1998, 3:00:00 AM1/16/98
to

I use Key-Commit trigger for committing data in a base table
to the database. And i'll do some final checks before i
issue a COMMIT command in the trigger. If there is any
error occur, a RAISE Form_Trigger_Failure is fired to
stop the program. But everytime i RAISE the Form_
Trigger_Failure and there is unCOMMITted record in the
base table block, the Form just prompt me to decide if
i want to save the information or not instead of
stop the program. I have 3 options,
Yes, No, or Cancel. When i choose Yes, the program
just COMMIT the block's items automatically!

But i RAISE Form_Trigger_Failure because there is something
wrong with the user input.

How can i kick the 'Yes, No, Cancel' away? If they
must appear, what should i do?

Thanks!

Thenard


Dennis Klindrup

unread,
Jan 20, 1998, 3:00:00 AM1/20/98
to

Hi Thenard

It could look like you try to navigate out of the block, which forces
Oracle to ask the question. Try to stay in the block. If you absolutely
have to leave the block, you could clear the record/block, or fiddle with
the status (WARNING: DIRTY INDEED, and may cause other problems in special
situations).
By the way: Have you considered what happens if the user does not commit
via the key-commit (i.e. types data in the block and tries to leave without
committing). If this is a potential problem, consider using on-commit
and/or post-forms-commit triggers. The commit-sequence is interrupted
automatically in case of failure in these triggers.

reg.

Dennis Klindrup


0 new messages