--custom function
--d_isei is my using shema your can change it to yours
create or replace function d_isei.B
return char
is
begin
return '1';
end;
/--procedure
create or replace procedure d_isei.pros
is
cursor cur_s is
--select a custom function here
select d_isei.B as b from dual; 
v_char char(1) := null;
v_cur cur_s%rowtype := null;
begin--solution a failed
/*
for v_cur in cur_s loop
v_char := v_cur.b; --it throws an exception here ORA-06502 char buffer too small
end loop;
*/--solution b failed
/*
open cur_s
fetch cur_s into v_cur; --it throws an exception here ORA-06502
v_char :=v_cur.b; 
close cur_s;
*/--solution c works well
open cur_s
fetch cur_s into v_char ;
colse cur_send;-----------------------------------------------------
the error occurs when select a custom function in a pl/sql procedure
who can tell me why ?
---------------Production Info--------------------------------------------------------
Oracle9i on unix
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
PL/SQL Release 9.2.0.5.0 - Production
CORE9.2.0.6.0Production