ORA-06550错误。请大侠们求解

lvinging 2012-11-08 08:53:23
{"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;
...全文
386 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
lvinging 2012-11-08
  • 打赏
  • 举报
回复
没人回答。自己顶一个。

110,545

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧