首页 > 应用开发 > IT综合 > PLS-00306: 调用 '过程名' 时参数个数或类型错误

PLS-00306: 调用 '过程名' 时参数个数或类型错误

原创 IT综合 作者:sdusun 时间:2019-06-25 21:30:06 0 删除 编辑

在C#开发的web服务中调用存储过程的时候,报错:PLS-00306: 调用 '过程名' 时参数个数或类型错误。但参数个数与类型均正确,原因何在呢?




OracleParameter sqlParameter1 = new OracleParameter("pbillid",DbType.String);
sqlParameter1.Value = sShipbillID.ToString();

在C# Web服务中必须保证 pbillid 与存储过程中完全一致!


Data Access Application Block: Default Oracle cursor cur_OUT

The managed provider for Oracle requires you to explicitly bind your reference cursor in your parameter collection. This means you must explicitly create an output parameter for the cursor in your application code. However, that code will not be portable with database systems that do not require a parameter for the cursor. The OracleDatabase allows you to create commands without specifying a cursor. It will create a cursor, named cur_OUT, for commands that execute a stored procedure and do not include an output parameter for the cursor. This means that you can name your reference cursor as "cur_OUT" and the Data Access Application Block will bind it for you; you do not need to explicitly create an output parameter for the cursor. If your stored procedures use a cursor with a name other than "cur_OUT," you must explicitly add a parameter for each cursor to the command. Similarly, if your stored procedure contains multiple cursors, you must explicitly add each cursor parameter to the command.

来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录


  • 博文量
  • 访问量