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: DBMS_SQL and Pragma

Re: DBMS_SQL and Pragma

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 06 Aug 1998 14:18:52 GMT
Message-ID: <35ccbb0b.5417079@192.86.155.100>


A copy of this was sent to nkodner_at_my-dejanews.com (if that email address didn't require changing) On Wed, 05 Aug 1998 20:53:22 GMT, you wrote:

>Help!!!!
>
>I'm trying to use DBMS_SQL to parse and execute a select statement that I'm
>building on-the-fly. If I call it as a stored function, Oracle returns:
>
> ORA-06571: Function GET_CASH does not guarantee not to update database
>
>So I put the function in a package, with a restrict references WNDS in the
>package header, and now it won't compile:
>
> PLS-00452: Subprogram 'GET_CASH' violates its associated pragma
>
>If I remove the RESTRICT_REFERENCES from the package header, the package
>compiles but I get the same ORA-06571 error when I try to call the function.
>

no luck. dbms_sql cannot guarantee to not update the database since it can execute "update T set..." as easily as "alter user..." as easily as "select * from T".

>Does anyone have any advice as to how I can get around this situation? I've
>been 'stuck' for quite a while and do not want to have to hard-code 40+
>functions!
>

can you tell us what you are trying to do, perhaps the group can offer up a different solution.

>Thanks in advance for all the help!
>
>--Neil Kodner
>nkodner_at_inconnect.com
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Thu Aug 06 1998 - 09:18:52 CDT

Original text of this message

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