FORMS_DDL('rollback') - does it makes sense?

From: Rolf Unger <rolf.unger_at_ctilabs.de>
Date: 19 Mar 2004 03:31:22 -0800
Message-ID: <32fe19ad.0403190331.e886328_at_posting.google.com>



Hi,

[Quoted] I want to do a rollback of my

 update table_b set col_a=2 where col_b = :BLOCK_A.col_b;

that I have executed in a "WHEN-BUTTON-PRESSED" trigger.

If I simply do the natural approach and use a "ROLLBACK" inside the trigger code, FORMS converts it to the built-in "Clear_Form" and all my blocks are empty. That's not what I want!

I googled on this issue, and found that some people recommend to use the Forms package FORMS_DDL for that. The examples that were used in those topics are all relating to a commit but not to a rollback.

I looked in the online help documentation and I found the following note:

,---------------------

: FORMS_DDL built-in
:
: Usage Notes:
: Commit (or roll back) all pending changes before you issue
: the FORMS_DDL command. All DDL operations issue an implicit
: COMMIT and will end the current transaction without allowing
: Form Builder to process any pending changes, as well as losing
: any locks Form Builder may have acquired.
:
'----------------------

I'm not sure, what "All DLL operations" should mean. Does it mean:

  1. "All calls to "FORMS_DDL" issue an internal commit!" In that case a forms_ddl('rollback') will actually do a commit (the internal one) and then the rollback that is passed as string parameter. Of course this makes it useless!
  2. "The internal commit is only executed if the string parameter passed to FORMS_DDL contains a DDL statement (e.g. 'truncate table a_table')" Despite from that it is basic SQL wisdom and related to any Database tools, that would mean that a 'delete from a_table' as parameter would not do a commit. So my forms_ddl('rollback') would only issue a rollback as instructed do without any internal commits before or after.

I'm happy about any comments. (Well, nearly every one :-)

Rolf. Received on Fri Mar 19 2004 - 12:31:22 CET

Original text of this message