【发布时间】:2011-08-10 10:43:36
【问题描述】:
我有一个非常简单的存储过程如下:
create or replace procedure WF_ALI is
ali number;
begin
ali :=2;
end;
和一个 .NET 代码如下:
GetDatabaseConnection();
sqlString = "WF_ALI";
command = new OracleCommand(sqlString, connection);
command.CommandType = System.Data.CommandType.StoredProcedure;
command.Parameters.Add("ali", OracleType.Number);
command.Parameters["ali"].Value = 4;
int32 rowsAffected = command.ExecuteNonQuery;
但是,它返回错误
PLS-00306: wrong number or types of arguments in call to WF_ALI.
我还使用 Toad for Oracle 进行了尝试。当我执行那个 sp 时,它返回同样的错误。
我可以连接到数据库。没有问题。我什至可以获得 SELECT 语句的结果。请帮忙。
【问题讨论】:
标签: c# .net oracle stored-procedures oracle11g