Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-06571 HELP!!! HELP!!! HELP!!!
Basically, you need to tell the compiler that this packaged function is
not going to do a update
to the database. To do this your function declaration needs to have a
Pragma Restrict_References statement. For example:
Create or replace package TestPkg as
Function TestFnct (str in varchar) return boolean;
Pragma restrict_references(IsDigits, RNDS,RNPS,WNDS,WNPS); End TestFnct;
. . . where: RNDS = Reads no database state - does not modify db table RNPS = Reads no package state - does not change pkg variables WNDS = Writes no database state - does not query db tables WNPS = Writes no package state - does not reference pkgvariables
I believe this is discussed in the Application Developers Guide.
Ismael Perez wrote:
> Ismael Perez wrote:
>
> Hi All,
>
> I have a problem with a Function. I´m using a function that
> INSERT
> records in a Table.
> The function is in a Package, the function Return a NUMBER. When I
> called this function from
> an SQL expression, such as:
> SELECT <function-name> FROM DUAL;
>
> Oracle return this Error:
> ORA-06571 Function <function-name> does not guarantee not to
> Update
> Database
>
> How can I resolve this Error...
>
> Thanks
>
> e-mail: perez32_at_arrakis.es
> ismael_at_eitb.com
Received on Fri Oct 10 1997 - 00:00:00 CDT