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

From: Rolf Unger <rolf.unger_at_ctilabs.de>
Date: 22 Mar 2004 13:00:43 -0800
Message-ID: <32fe19ad.0403221300.7e17dab_at_posting.google.com>


Tiago Rocha <please.see.link.at.signature.for.email.address_at_zaz.com.br> wrote in message news:<papl50l57ogei0k8tp51utqjd10sfnsf6k_at_4ax.com>...
> On 19 Mar 2004 03:31:22 -0800, rolf.unger_at_ctilabs.de (Rolf Unger) wrote:
>
> >Hi,
> >
> >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!
>
> You can tell forms that these records aren't new, so forms won't
> issue an "insert" or "update".
>
> Set_Record_Property( block_name, 'QUERY_STATUS' ) will do this.
>
> hth

Hm,
I guess I was not clear enough. Forms doesn't know anything about the update. It is processed in the background on the database. The button trigger that I am refering to is a simple push button, that has no relation to a database block.

I'm pretty sure that I haven't changed any block items when I issue the "rollback;" in the trigger, so the status of the block or the system should be 'QUERY_STATUS' already (or still).

What I did to keep Forms from clearing all my blocks is to use a stored database package:

CREATE OR REPLACE PACKAGE hidden
AS
  PROCEDURE do_rollback;
END; CREATE OR REPLACE PACKAGE BODY hidden
AS
  PROCEDURE do_rollback
  IS
  BEGIN
     ROLLBACK;
  END;
END; And instead of putting a straight

 rollback;

in my trigger code, i do:

 hidden.do_rollback;

... and it does what I need.

Still, it's one more point that makes me think: "If I need to work with such sick workarounds, I should maybe  decide that this tool has too many limitations. Time to code  everything in Java!"

Rolf. Received on Mon Mar 22 2004 - 22:00:43 CET

Original text of this message