VB.Net program using Oracle Function: Problem w/ datatype
494710Apr 19 2006 — edited Apr 19 2006I'm modifiying a function that's part of an Oracle package.
Previously I was passing in 3 varchar2 values and the function worked fine. Now, I need to pass in an integer (numDays) from vb program.
Here's part of the function:
FUNCTION TEST
( p_prod_date_start VARCHAR2,
p_prod_date_end varchar2,
p_pm VARCHAR2,
p_num_days number )
RETURN number IS p_speed number(10);
Here's the code to pass the new parameter:
cmd.Parameters.Add("p_num_days", OracleDbType.Long).Value = numDays
I do a cmd.ExecuteNonQuery() and the it hits the exception logic w/ the following error:
ORA-06502: PL/SQL: numeric or value error: number precision too large ORA-06512: at "PTS_EXCHANGE.PRODUCTION_REPORT", line 196 ORA-06512: at line 1
I've tried specifying many oracledbtypes when adding my parameter, but I just can't get it to work.
I'm using ODP.net 9.2.0.4.01
Thanks!