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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Post-Database-Commit trigger<br />

Description<br />

Fires once during the Post and Commit Transactions process, after the database commit occurs. Note<br />

that the Post-<strong><strong>Form</strong>s</strong>-Commit trigger fires after inserts, updates, and deletes have been posted to the<br />

database, but before the transaction has been finalized by issuing the Commit. The Post-Database-<br />

Commit trigger fires after <strong>Form</strong> <strong>Builder</strong> issues the Commit to finalize the transaction.<br />

Definition Level form<br />

Legal Commands<br />

SELECT statements, DML statements (DELETE, INSERT, UPDATE), unrestricted built-ins<br />

Enter Query Mode no<br />

Usage Notes<br />

Use a Post-Database-Commit trigger to perform an action anytime a database commit has occurred.<br />

On Failure<br />

There is no rollback, because at the point at which this trigger might fail, <strong>Form</strong> <strong>Builder</strong> has already<br />

moved past the point at which a successful rollback operation can be initiated as part of a failure<br />

response.<br />

Fires In<br />

Post and Commit Transactions<br />

See Process Flowcharts<br />

Post-Database-Commit trigger examples<br />

Example<br />

/*<br />

** FUNCTION recs_posted_and_not_committed<br />

** RETURN BOOLEAN IS<br />

** BEGIN<br />

** Default_Value(’TRUE’,’Global.Did_DB_Commit’);<br />

** RETURN (:System.<strong>Form</strong>_Status = ’QUERY’<br />

** AND :Global.Did_DB_Commit = ’FALSE’);<br />

** END;<br />

*/<br />

BEGIN<br />

:Global.Did_DB_Commit := ’FALSE’;<br />

END;<br />

464

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

Saved successfully!

Ooh no, something went wrong!