RE: ** ORA-06502

From: A Joshi <ajoshi977_at_yahoo.com>
Date: Tue, 12 Feb 2008 11:04:09 -0800 (PST)
Message-ID: <221767.8928.qm@web58009.mail.re3.yahoo.com>


Thanks Thomas, Jared for the response.    

  The issue was that I had defined a variable in sqlplus as    

  sqlplus> var v_f_name varchar2    

  then run the SP using exec by passing this v_f_name to the SP. I have used this type of definition for refcur too and it worked fine. Later I created a pl/sql block and defined it as v_f_name varchar2(50) and all was fine.    

  I will stick to pl/sql block unless I get details about missed with var definition. It is strange that it defines it as varchar2(1). And refcur works fine. Thanks   

"Mercadante, Thomas F (LABOR)" <Thomas.Mercadante_at_labor.state.ny.us> wrote:

      Joshi,    

  What is the size of the receiving parameter and how much data are you storing into it?   

for example:    

  In your calling procedure, you declared something like:    

  calling_str varchar2(1);    

  begin
  procedure f_name_for_empid( 1,calling_str);   end;   

If the f_name_for_empid procedure passes back anything larger than varchar2(1), then you get the 6502 error. If you increase the size of the declaration of calling_str to varchar2(100) (or some other reasonable value) then the error would probably go away.   

Tom     



  From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of A Joshi Sent: Sunday, February 10, 2008 9:47 PM
To: oracle-l_at_freelists.org
Subject: ** ORA-06502   

Hi,
  I have a stored procedure with a out parameter defined as :

procedure f_name_for_empid(
empid in number,
f_name out varchar2 )

For some reason I am getting error ORA-06502 in the statement where I am setting f_name. I am able to set it to one char. However, if I set it to two or more char it gives error ORA-06502. I have similar bigger SP and all looks fine. Does anyone have similar experience and what could be reason. Thanks     



  Looking for last minute shopping deals? Find them fast with Yahoo! Search.        

Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
--
http://www.freelists.org/webpage/oracle-l
Received on Tue Feb 12 2008 - 13:04:09 CST

Original text of this message