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: ORA-06571 HELP!!! HELP!!! HELP!!!

Re: ORA-06571 HELP!!! HELP!!! HELP!!!

From: Lando <MarkL_at_quebim.com>
Date: 1997/10/10
Message-ID: <343E6868.924CE687@quebim.com>#1/1

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

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

Original text of this message

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