I am invoking an Oracle stored procedure witch contains 15 input parameters and 4 output parameters. Output parameters are set like this:
OracleParameter p_errn = cmd.Parameters.Add("pErrCode", OracleDbType.Decimal, 10);
p_errn.Direction = ParameterDirection.Output;
OracleParameter p_errm = cmd.Parameters.Add("pErrMsg", OracleDbType.Varchar2, 1000);
p_errm.Direction = ParameterDirection.Output;
OracleParameter pStatus = cmd.Parameters.Add("pStatus", OracleDbType.Decimal, 10);
pStatus.Direction = ParameterDirection.Output;
OracleParameter pID = cmd.Parameters.Add("pID", OracleDbType.Varchar2, 1000);
pID.Direction = ParameterDirection.Output;
Procedure i successfully executed but output paramers values are mixed up. Value that should be in pId is in pStatus, value that should be in pStatus is in pErrMsg and so on.
I have also tried to get values by getting from Parameter collection:
cmd.Parameters["pErrMsg"].Value.ToString()
but the situation is the same.
I have checked stored procedure, an everything seems fine. All the output parameters are set correctly.
Anyone had similar problem or some hint what causes this behaviour?