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: call a function that modifies DB ?

Re: call a function that modifies DB ?

From: L120bj <l120bj_at_aol.com>
Date: 1998/01/21
Message-ID: <19980121113600.GAA26950@ladder01.news.aol.com>#1/1

>> 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
>
>
>
>
>
>
>
>
>
>

have you specified the following :-

pragma restrict_references(encrypt,wnds) after the function definition in the package header ?

wnds tells ORACLE that the function will not alter the state of the database. If you subsequently compile the package body and it fails, with sho err giving a message along the lines of
function encrypt violates it's associated pragma, then you may be using something such as RAISE_APPLICATION_ERROR. I have also find that defining a variable as <cursor>%rowtype causes this problem. Received on Wed Jan 21 1998 - 00:00:00 CST

Original text of this message

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