これと 2 日間格闘しており、非常にイライラしていますが、前進しているように感じます。Oracle のオンライン ドキュメントを確認した後、ここにいます。コードの実行時に次のエラーを受け取る:
ORA-06550: 行 1、列 15: PLS-00306: 'P_SALTEDHASH' の呼び出しで引数の数または型が間違っています ORA-06550: 行 1、列 7: PL/SQL: ステートメントは無視されました
ストアド プロシージャは次のようになります。
PROCEDURE stored_procedure_name ( p_passwd IN VARCHAR2,
p_salt IN VARCHAR2,
p_saltedhash_passwd OUT VARCHAR2
)
私のコード:
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);`