Re: How to rollback database changes made in when_button_pressed triggers?

From: Jason Judge <jason.judge_at_virgin.net>
Date: Wed, 27 Oct 1999 00:38:03 +0100
Message-ID: <7v5dc1$ci0$1_at_nclient13-gui.server.virgin.net>


The forms_ddl suggestions will work OK - but it could affect your form. If any locks have been taken out by the user updating a base-table block then these locks will be dropped when you roll back.

As an alternative, you could move your database update code to the commit processing triggers (pre/on/post-insert/update etc). The button that you referred to could then update a base-table block that causes your trigger code to fire and update the database when the user commits. If the commit fails in any way then Forms will do the full rollback for you.

When you issue a 'commit' in Forms it will issue a savepoint. If any errors occur in any trigger in the commit processing then Forms will roll back to this point.

Regards,

Jason Judge Received on Wed Oct 27 1999 - 01:38:03 CEST

Original text of this message