这是我收到的错误消息
ORA-06550: line 1, column 15:
PLS-00306: wrong number or types of arguments in call to 'OBPL_SU_PLAN_UPDATE_PLAN_DTLS'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
代码:
OracleCommand cmd = new OracleCommand();
cmd.Connection = conn;
cmd.CommandText = "CWPCDS.OBPL_SU_PROCESS_PKG.OBPL_SU_PLAN_UPDATE_PLAN_DTLS";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("P_PLAN_DETAIL_ID", OracleDbType.Int32).Value = detailId;
cmd.Parameters.Add("P_PLAN_USER_DETAIL_ID", OracleDbType.Int32).Value = null;
cmd.Parameters.Add("P_TRANSACTION_PLAN", OracleDbType.NVarchar2, 20).Value = null;
cmd.Parameters.Add("P_PLAN_REV_ID", OracleDbType.Int64).Value = planRev;
cmd.Parameters.Add("P_TRANSACTION_TYPE", OracleDbType.NVarchar2, 20).Value = transType;
cmd.Parameters.Add("P_PLAN_STATUS", OracleDbType.NVarchar2, 30).Value = status;
cmd.Parameters.Add("P_DOC_ISSUE_DATE", OracleDbType.Date).Value = pid;
cmd.Parameters.Add("P_EST_OBLG_DATE", OracleDbType.Date).Value = eod;
cmd.Parameters.Add("P_AMT_TO_APPLY", OracleDbType.Int32).Value = amtApply;
cmd.Parameters.Add("P_WBS", OracleDbType.NVarchar2, 20).Value = wbs;
cmd.Parameters.Add("P_AMT1_TO_APPLY", OracleDbType.Int32).Value = 0;
cmd.Parameters.Add("P_AMT2_TO_APPLY", OracleDbType.Int32).Value = 0;
cmd.Parameters.Add("P_UPDATE_USER", OracleDbType.NVarchar2, 50).Value =
user;
cmd.Parameters.Add("P_DESC_WORK", OracleDbType.NVarchar2, 50).Value = dow;
cmd.Parameters.Add("P_RET_CODE", OracleDbType.Int32).Direction =
ParameterDirection.Output;
cmd.Parameters.Add("P_RET_MSG", OracleDbType.Varchar2, 50).Direction =
ParameterDirection.ReturnValue;
cmd.ExecuteNonQuery();
我可以从 Toad 运行该程序而不会出现任何错误,Toad 中的日期格式是“05-MAY-2012”。如果我尝试在代码隐藏中的日期值中添加一个单独的 qoute,则会收到“字符文字中的字符过多”错误。非常感谢任何帮助或指导!