I have an oracle stored procedure that will return a value. I need to get the OUTPUT value in my C # program. I need to know how we can get the OUTPUT parameter using the OracleCommands AddWithValue method.
Now I wrote:
OracleCommand Ocmd = new OracleCommand(_StoredProcedure, OraCon); Ocmd.CommandType = CommandType.StoredProcedure; Ocmd.Parameters.AddWithValue("Filed1", "Value1"); Ocmd.Parameters.AddWithValue("OUTPUTParam","").Direction = ParameterDirection.Output; OraCon.Open(); int RecivedDetID = Ocmd.ExecuteNonQuery(); OraCon.Close(); return Ocmd.Parameters[_OutParam].Value.ToString();
I know that OUTPUTPARAm, as I called, is wrong. How can I achieve this using the AddWithValue of the OracleCommand method. I do not want to use the OracleCommands Add method, where we need to also specify Type.
smilu
source share