Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: call a function that modifies DB ?
Hi,
Select a from dual only works if nothing updates the database, so surely
select a for update will not work i think, but maybe you have the same
problem
as we had that there's an exception in your package functions that uses
something like "raise_application_error". That oracle function updates
deep down the db.
If you use it, get rid of it, try the select without update or don't use
the select
and use an exec with select for update in your procedure.
Jeroen
Bill Dietrich wrote:
> Using Oracle 7, in SQL*Plus, I need to call a function
> and get its result. I'm trying the following, and getting
> an error:
>
> SQL> select apps_appdemo.icx_call.encrypt('WF') from dual for update;
> select apps_appdemo.icx_call.encrypt('WF') from dual for update
> *
> ERROR at line 1:
> ORA-06571: Function ENCRYPT does not guarantee not to update database
>
> What am I doing wrong, and how can I fix it ? I've tried using
> update instead of select, tried select without "for update", etc.
> I can't modify the function; it is an Oracle Applications function.
>
> Thanks,
>
> Bill Dietrich
> bill_dietrich_at_wayfarer.com
Received on Tue Jan 20 1998 - 00:00:00 CST