Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Q: "Autorollback" after raise_application_error()

Re: Q: "Autorollback" after raise_application_error()

From: Rudi Demeulenaere <rdm_at_datafront.nospam.be>
Date: Thu, 28 Oct 1999 20:02:19 +0200
Message-ID: <38188FAB.1B812A85@datafront.nospam.be>


Gombos Bertalan wrote:

> Hi all,
>
> When I call a stored procedure from OCI, Oracle generates a savepoint to
> begin of the procedure. If I issue a raise_application_error() and this
> error reaches the caller environment (Power Builder), Oracle gives a
> rollback to the former savepoint.
> Is it possible to prevent Oracle from rollbacking?

You can do something like
  (...)
  exception
    when your_exception then

      commit;
      raise_application_error(your_exception);
  end;
  (...)
I'm not pronouncing myself if this makes any sense for your logical environment though.

Another possibility is to execute a separate transaction (supposing you want *something* done but not what you did so far). Facility only available from 8i if I'm not mistaking. Maybe this complies also to your wishes:   (...)
  exception
    when your_exception then

      rollback;
      do_what_you_want_to_do; /* e.g. logging in some error table */
      commit;
      raise_application_error(your_exception);
  end;
  (...)

Regards

</rudi> Received on Thu Oct 28 1999 - 13:02:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US