I am trying to execute some oracle pl/sql procedure with in and out parameters from # code on asp.net. I want to retrive the value from out parameter. but when I execute i am ge
Another strage thing we RAN into related to this is with Oracle functions, for the special ParameterDirection.ReturnValue (*** all the rest of the ParameterDirection will work)
if you decalre it like bellow, directly in the constructor it DOSEN'T work:
cmd.Parameters.Add(new OracleParameter("myretval", OracleDbType.Long, 10, ParameterDirection.ReturnValue));
Result in error like:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-01403: no data found
ORA-06512: at line 1
if you declare it like this it works:
OracleParameter retval = (new OracleParameter("myretval", OracleDbType.Long, 10);
retval.Direction = ParameterDirection.ReturnValue;
cmd.Parameters.Add(retval);