Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

When exiting a form no ask_commit is done.

WoMoDec 30 2009 — edited Dec 30 2009
Forms 6i.

I want to commit data only when I the user exits the form.
In my form is a button, that updats some data in the db.

I have following when-button-pressed code:

connection_id := EXEC_SQL.DEFAULT_CONNECTION;
cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);
exec_sql.parse(connection_id, cursorid, 'update versand_packl_head
set status = ''S'', bearb_kz = user, bearb_dat = sysdate
where packl_nr = :p_1
and sprach_kz = :p_2'
,exec_sql.V7);
EXEC_SQL.BIND_VARIABLE(connection_id, cursorID, ':p_1', :VERSAND_PACKL_AUFTRAG_WALZE.packl_nr);
EXEC_SQL.BIND_VARIABLE(connection_id, cursorID, ':p_2', :VERSAND_PACKL_AUFTRAG_WALZE.sprach_kz);
nIgn := EXEC_SQL.EXECUTE(connection_id, cursorID);
:system.message_level := 5;
post; -- --> post do not work. With commit it works.
:system.message_level := 0;

The code works fine, but when I leave the form, forms do not ask to save data. It closes and no update are written to db.
If I would write a "commit" instead of "post" into the trigger code, the data is written.

But I do not want a commit in the code. Forms should ask the user for commit at the ent of the form.

Has anyone a Idea, why it do not work?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 27 2010
Added on Dec 30 2009
5 comments
1,358 views