I have found this problem, and related it to the use of blocks. Try to stay
away from the BEGIN and END if you don't need to use it.
Sent: Tuesday, July 02, 2002 17:39
Subject: Re: trap informix store procedure errors!
Make sure that you are issuing a RETURN to pass back the desired value. I
suspect that you have your exception handling slightly wrong.
I assume that you are not RESUMEing after an exception. In this case the
RETURN should execute because it occurs outside the block that generates the
error. When an error occurs in SPL execution resumes after the block that
generates the error (as defined by begin and end).
I am doing this from memory, which is 100% defective, so the exact syntax
might not be correct.
----- Original Message -----
Sent: Monday, July 01, 2002 10:11 PM
Subject: trap informix store procedure errors!
> SCO Unix
> Informix IDS 7.31.UC7
> procedure code as the additional(D_test.sql):
> but the error_trapping mechanism (ON EXCEPTION...END EXCEPTION)doesn't
> I want to pass the procedure result (p_sql_err) to external application
> language function ),
> but the error_trapping mechanism does't work.
> No matter what errors occured ,the Proc_TestProc() always return as
> EXECUTE PROCEDURE Proc_TestProc('123','1111122222333334444455555');
> 1 row(s) retrieved.