Re: Package: Simple question from novice

From: Maxim Sokolnikov <maxim_at_ns.mpsb.moris.rosmail.com>
Date: 1997/12/18
Message-ID: <3499571D.4AA452BE_at_ns.mpsb.moris.rosmail.com>#1/1


Magnus S. Petersen wrote:

> I have just started with packages in Personal Oracle7.
> First i wrote a standalone function Addfive, called it from SQL*Plus
> and it works fine.
> Then i deleted the function and put it in a package.
> Both the package specification and body compiles fine.
> Now it does not work, because i get the following error:
> ORA-06571:
> Function ADDFIVE does not guarantee not to update database
> when i execute the following select statement:
> select test_package.addfive(10) from sys.dual;
>

 pragma restrict_references (xlat,WNDS);

> The package is as follows:
> PACKAGE TEST_PACKAGE
> IS
> FUNCTION AddFive(Amount IN NUMBER)
> RETURN NUMBER;
Just insert This here.... pragma restrict_references (AddFive,WNDS);

> END;
that will help You

Regards
Maxim Received on Thu Dec 18 1997 - 00:00:00 CET

Original text of this message