11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

On-Commit trigger<br />

Description<br />

Fires whenever <strong>Form</strong> <strong>Builder</strong> would normally issue a database commit statement to finalize a transaction.<br />

By default, this operation occurs after all records that have been marked as updates, inserts, and deletes<br />

have been posted to the database.<br />

The default COMMIT statement that <strong>Form</strong> <strong>Builder</strong> issues to finalize a transaction during the Post and<br />

Commit Transactions process.<br />

Definition Level form<br />

Legal Commands<br />

SELECT statements, PL/SQL, unrestricted built-ins<br />

Enter Query Mode no<br />

Usage Notes<br />

• Use an On-Commit trigger to change the conditions of normal <strong>Form</strong> <strong>Builder</strong> commit processing to<br />

fit the particular requirements of a commit to a non-ORACLE database.<br />

• To perform the default processing from this trigger, call to the built-in.<br />

On Failure<br />

Aborts Post and Commit processing<br />

Fires In<br />

Post and Commit Transactions<br />

See Process Flowcharts<br />

On-Commit trigger examples<br />

Example<br />

This example disables the commit operation when running against a datasource that does not support<br />

transaction control. If the application is running against ORACLE, the commit operation behaves<br />

normally.<br />

BEGIN<br />

IF Get_Application_Property(DATA_SOURCE) = ’ORACLE’ THEN<br />

Commit_<strong>Form</strong>;<br />

ELSIF form_fatal OR form_failure THEN<br />

raise form_trigger_failure;<br />

END IF;<br />

/*<br />

** Otherwise, no action is performed<br />

*/<br />

END;<br />

440

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!