方法没有重载需要1个参数 [英] No overload for method takes 1 arguments
问题描述
我在我的oracle数据库中有一个存储过程同样如下:
I have one store procedure in my oracle database same this:
create or Replace PROCEDURE ussd_100(INSHENASEHG IN VARCHAR2,
outSHENASEHP out varchar2,
outamt out number)
IS
Begin
Select a_SHENASEHP,nvl(a_amtkol,0)-nvl(a_cred,0) InTo outSHENASEHP,outamt From A_ghabz
Where A_SHENASEHG=INSHENASEHG AND A_YEAR=95 AND A_ghabz=1;
End ;
/
Commit;
Show Errors;
<pre>when I call this procedure in my asp.net mvc action same under:
<pre lang="c#"> public ActionResult SearchEshtrak(string A_SHENASEHG)
{
return db.USSD_100(A_SHENASEHG).ToString();
}
我的尝试:
我有消息错误:
方法'USSD_100'没有重载需要1个参数
请帮帮我。谢谢
What I have tried:
I have under message error:
No overload for method 'USSD_100' takes 1 arguments
please help me.thanks
推荐答案
看看错误信息:
Look at the error message:
No overload for method 'USSD_100' takes 1 arguments
很明显:方法USSD_100没有接受一个(且只有一个)参数的版本 - 可能有不带参数的版本,可能有两个或更多的版本。但是没有版本可以拿一个。
所以看看你的方法的定义,并找出你需要提供的参数 - 我们做不到for you!
It's pretty clear: the method USSD_100 does not have a version which accepts one (and only one) argument - there may be versions that take no arguments, there may be versions which take two or more. But there are no versions which take one.
So look at the defintion of your method, and work out what parameters you need to supply - we can't do that for you!
我认为您需要使用输出变量的参数,请参阅: sql server - 在C#中使用存储过程输出参数 - Stack Overflow [ ^ ]
I think you need to use parameters for the out variables, see: sql server - Using stored procedure output parameters in C# - Stack Overflow[^]
这篇关于方法没有重载需要1个参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!