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: Function USER_DEF_CASE does not guarantee not to update database

Re: ORA-06571: Function USER_DEF_CASE does not guarantee not to update database

From: bhogak <bhogak_at_yahoo.com>
Date: Wed, 31 Oct 2001 20:48:43 -0600
Message-ID: <9rqdho$86j$1@bob.news.rcn.net>


If you want to use this function in a Select statement, you cannot insert into the error log table. In the exception clause, let the function return sqlcode (or something similar). Then you will be able to call this function in a Select statement.

If you want to call this same function within some other stored procedure, let the calling program log into the error log table based on the returned sqlcode.

bhogak

Sagar Nandela <nandela_v_at_yahoo.com> wrote in message news:fdbe4d9b.0110311342.66d4b1a3_at_posting.google.com...
> Hi
>
> I wrote a function called user_def_case.i want to call this function
> in select statement.
>
> Example: SELECT user_def_case(1500,1,'0_2000') from dual;
>
> I am getting the following error.
>
> ORA-06571: Function USER_DEF_CASE does not guarantee not to update
> database
>
> Inside function i want to insert errors into error_log table in
> exception handler if function fails due to data problem.If i remove
> this insert statement in exception handler section it will work.I saw
> posted messages related to this error.They suggested use pragram
> wnds.but it will not solve my problem.If i put this pragma wnds,it
> will not write errors into error_log table.I want to write errors into
> error_log table.Please help me,how to solve this problem.i am using
> oracle 8.0.5.
>
> Sagar
Received on Wed Oct 31 2001 - 20:48:43 CST

Original text of this message

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