Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Q: "Autorollback" after raise_application_error()
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;
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