ORA-06550错误。请大侠们求解
{"ORA-06550: 第 1 行, 第 7 列: \nPLS-00306: 调用 'PROC_APPNOLIST' 时参数个数或类型错误\nORA-06550: 第 1 行, 第 7 列: \nPL/SQL: Statement ignored\n"}
OracleParameter[] pm = new OracleParameter[7];
pm[0] = new OracleParameter("cardno", OracleType.VarChar,10);
pm[0].Direction = ParameterDirection.Input;
pm[0].Value = cardNo;
pm[1] = new OracleParameter("userid", OracleType.VarChar, 20);
pm[1].Direction = ParameterDirection.Input;
pm[1].Value = userID;
pm[2] = new OracleParameter("secrityno", OracleType.VarChar, 32);
pm[2].Direction = ParameterDirection.Input;
pm[2].Value = secrityNo;
pm[3] = new OracleParameter("cardserno", OracleType.VarChar, 32);
pm[3].Direction = ParameterDirection.Input;
pm[3].Value = cardSerNo;
pm[4] = new OracleParameter("curout", OracleType.Cursor);
pm[4].Direction = ParameterDirection.Output;
pm[5] = new OracleParameter("resultcode", OracleType.Int16);
pm[5].Direction = ParameterDirection.Output;
pm[6] = new OracleParameter("errormsg", OracleType.VarChar, 200);
pm[6].Direction = ParameterDirection.Output;
#endregion
DataSet ds = new DataSet();
using (OracleConnection conn = new OracleConnection(strConn))
{
try
{
conn.Open();
OracleCommand cmd = conn.CreateCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "pkg_autobillservice.proc_getbillinfo";
//cmd.Parameters.AddRange(pm);
foreach (OracleParameter om in pm)
{
cmd.Parameters.Add(om);
}
OracleDataAdapter oda = new OracleDataAdapter(cmd);
oda.Fill(ds, "table");
}
catch (Exception e)
{
throw e;
}
}
在oda.Fill(ds,"table") 处,
一下是存储过程。
PROCEDURE proc_getbillinfo(patientid IN VARCHAR2,
userid IN VARCHAR2,
password IN VARCHAR2,
cardserno IN VARCHAR2,
curout OUT ref_cur,
resultcode OUT INTEGER,
errormsg OUT VARCHAR2) AS
v_sql VARCHAR2(2000);
BEGIN
proc_cardcheck(patientid, password, cardserno, resultcode);
IF resultcode <> 0 THEN
resultcode := 1;
errormsg := 'HIS:卡验证失败!!';
RETURN;
END IF;
v_sql := 'select item_code,item_name,item_class,class_name,
costs,amount,dept_name,rcptgroupid
from v_outp_orders_costs
WHERE patient_id = :cardno';
OPEN curout FOR v_sql
USING patientid;
resultcode := 0;
errormsg := '';
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
resultcode := 1;
errormsg := SQLERRM;
END proc_getbillinfo;