C# exception when calling stored procedure: ORA-01460 - unimplemented or unreasonable conversion req
- by Taylor L
I'm trying to call a stored procedure using ADO .NET and I'm getting the following error:
ORA-01460 - unimplemented or
unreasonable conversion requested
The stored procedure I'm trying to call has the following parameters:
param1 IN VARCHAR2,
param2 IN NUMBER,
param3 IN VARCHAR2,
param4 OUT NUMBER,
param5 OUT NUMBER,
param6 OUT NUMBER,
param7 OUT VARCHAR2
Below is the C# code I'm using to call the stored procedure:
OracleCommand command = connection.CreateCommand();
command.CommandType = CommandType.StoredProcedure;
command.CommandText = "MY_PROC";
OracleParameter param1 = new OracleParameter() { ParameterName = "param1", Direction = ParameterDirection.Input,
Value = p1, OracleDbType = OracleDbType.Varchar2, Size = p1.Length };
OracleParameter param2 = new OracleParameter() { ParameterName = "param2", Direction = ParameterDirection.Input,
Value = p2, OracleDbType = OracleDbType.Decimal };
OracleParameter param3 = new OracleParameter() { ParameterName = "param3", Direction = ParameterDirection.Input,
Value = p3, OracleDbType = OracleDbType.Varchar2, Size = p3.Length };
OracleParameter param4 = new OracleParameter() { ParameterName = "param4", Direction = ParameterDirection.Output,
OracleDbType = OracleDbType.Decimal };
OracleParameter param5 = new OracleParameter() { ParameterName = "param5", Direction = ParameterDirection.Output,
OracleDbType = OracleDbType.Decimal};
OracleParameter param6 = new OracleParameter() { ParameterName = "param6", Direction = ParameterDirection.Output,
OracleDbType = OracleDbType.Decimal };
OracleParameter param7 = new OracleParameter() { ParameterName = "param7", Direction = ParameterDirection.Output,
OracleDbType = OracleDbType.Varchar2, Size = 32767 };
command.Parameters.Add(param1);
command.Parameters.Add(param2);
command.Parameters.Add(param3);
command.Parameters.Add(param4);
command.Parameters.Add(param5);
command.Parameters.Add(param6);
command.Parameters.Add(param7);
command.ExecuteNonQuery();
Any ideas what I'm doing wrong?