ORA-06502: PL/SQL: numeric or value error: character string buffer too small – Solution
We get following error while executing insert procedure of oracle which inserts record and return primary key.
ERROR: ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at line 1
Just in our case, issue is we didn’t given the size of output oracle parameter when assigned to command.
param = New OracleParameter(“p_sh_behavior_seq”, OracleDbType.Long)
param.Value = m_sh_behavior_seq
param.Direction = ParameterDirection.Output
param.Size = 9
cmdOracle.Parameters.Add(param)
And it works!!!
Thanks for the hint. MS Oracle Adapter did this on it’s own.
Stefan Jope
July 31, 2008 at 11:20 am
I have given the size of paramter, still
getting the same error.Do you have any other
solution or can give me a hint, why this is
not working at my end?
NetDeveloper
October 14, 2008 at 8:00 am
Because Oracle is shitty that’s why
devvvy
June 29, 2009 at 8:39 am
thank u! it worked for me.
kesh
August 14, 2009 at 1:48 pm