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.

POST built-in<br />

Description<br />

Writes data in the form to the database, but does not perform a database commit. <strong>Form</strong> <strong>Builder</strong> first<br />

validates the form. If there are changes to post to the database, for each block in the form <strong>Form</strong> <strong>Builder</strong><br />

writes deletes, inserts, and updates to the database.<br />

Any data that you post to the database is committed to the database by the next COMMIT_FORM that<br />

executes during the current Runform session. Alternatively, this data can be rolled back by the next<br />

CLEAR_FORM.<br />

Syntax<br />

PROCEDURE POST;<br />

Built-in Type restricted procedure<br />

Enter Query Mode no<br />

Parameters<br />

none<br />

Usage Notes<br />

If this form was called via OPEN_FORM with the NO_SESSION parameter specified, then the POST<br />

will validate and write the data both in this form and in the calling form.<br />

POST examples<br />

320<br />

/*<br />

** Built-in: POST and EXIT_FORM<br />

** Example: Leave the called form, without rolling back the<br />

** posted changes so they may be posted and<br />

** committed by the calling form as part of the<br />

** same transaction.<br />

*/<br />

BEGIN<br />

Post;<br />

/*<br />

** <strong>Form</strong>_Status should be ’QUERY’ if all records were<br />

** successfully posted.<br />

*/<br />

IF :System.<strong>Form</strong>_Status ’QUERY’ THEN<br />

Message(’An error prevented the system from posting<br />

changes’);<br />

RAISE <strong>Form</strong>_trigger_Failure;<br />

END IF;<br />

/*<br />

** By default, Exit_<strong>Form</strong> asks to commit and performs a<br />

** rollback to savepoint. We’ve already posted, so we do<br />

** not need to commit, and we don’t want the posted changes<br />

** to be rolled back.<br />

*/<br />

Exit_<strong>Form</strong>(NO_COMMIT, NO_ROLLBACK);<br />

END;

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

Saved successfully!

Ooh no, something went wrong!