We struggled with this for two days, and I am very upset, but I feel that I am moving forward. After reviewing Oracle online docs, I'm here. Getting error while executing code:
ORA-06550: row 1, column 15: PLS-00306: wrong number or argument types when calling 'P_SALTEDHASH' ORA-06550: row 1, column 7: PL / SQL: expression is ignored
The stored procedure is as follows:
PROCEDURE stored_procedure_name ( p_passwd IN VARCHAR2, p_salt IN VARCHAR2, p_saltedhash_passwd OUT VARCHAR2 )
My code is:
string stored_procedure_name = "stored_procedure_name"; // create the command object OracleCommand cmd = conn.CreateCommand(); cmd.Connection = conn; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = stored_procedure_name; cmd.BindByName = true; //Oracle Parameters necessary for the p_saltedhash function cmd.Parameters.Add("p_passwd", p_passwd); cmd.Parameters.Add("p_salt", p_salt); OracleParameter p_saltedhash_passwd = new OracleParameter("p_saltedhash_passwd", OracleDbType.Varchar2); p_saltedhash_passwd.Direction = ParameterDirection.ReturnValue; cmd.Parameters.Add(p_saltedhash_passwd); // execute the pl/sql block cmd.ExecuteNonQuery(); Response.Write("Pin hash is: " + p_saltedhash_passwd);`
source share