Avoid the error "numeric or value error" when calling Oracle stored procTag(s): Common problems

If you are passing variables to Oracle stored procedure by reference, you need to assign memory first to receive the result. For example, if you are expecting to return a string of length 10, try initializing the variable.
[Oracle stored proc]
create procedure p_ret ( as_name OUT varchar2 ) as
 begin
   as_name  := 'SAM' ;
 end ; 
 
[PB local extenral function declaration]
SUBROUTINE p_ret ( REF string as_name ) RPCFUNC ;

[PB calling the stored proc]
ls_name = space(10)
SQLCA.p_ret(ls_name)



If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2011
[ home ]