两天来一直在为这件事而战,我感到非常沮丧,但感觉我正在取得进步。在查看了甲骨文的在线文档之后,我来到这里。在执行代码时收到以下错误:
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);`发布于 2011-11-10 19:44:41
变化
p_saltedhash_passwd.Direction = ParameterDirection.ReturnValue;至
p_saltedhash_passwd.Direction = ParameterDirection.Output;https://stackoverflow.com/questions/8085314
复制相似问题