Click here to Skip to main content
15,885,918 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI ALL

While Debugging the procedure i am getting
"ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512:"



The above error is occurring in the Exception part while concatenating the errors into the variable i am getting the buffer too small error.

After assigning a proper datatype with huge size i am getting the above error.

I am using VARCHAR2 as a datatype for that variable.

Can anybody having a solution for my problem.

Rgds
Jagadesh
Posted
Updated 30-Nov-19 15:18pm
v2
Comments
krumia 18-Jul-12 2:24am    
Please post your code. Can't tell anything from this description.

Based on the discussion below, it looks like the variable datatype is not enough to hold the data being passed to it.
Within PL/SQL a varchar2 can be as long as 32767;

You need to increase the data allocating more space. Discussions below has few answers suggesting ways to do it, see if they help:
ORA-06502 character string buffer too small...1[^]
ORA-06502 character string buffer too small...2[^]
 
Share this answer
 
my stored procedure had "keys" as an output parameter in definition.

command.Parameters.Add("keys", OracleDbType.Varchar2, 32767).Direction = ParameterDirection.Output;

fixed it for me.. passing the size of output varchar variable along the type.

hope this helps someone looking for the solution of this error. - SJ
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900