这是nhibernate映射:
<sql-query name="SEL_COUNT" >
<return-scalar column="V_DebtorCount" type="Int32"/>
{ call SEL_COUNT(:V_USER_ID) }
</sql-query>
这是对存储过程的调用:
private static int GetAllCount(string userID, ISession session)
{
IQuery query = session.GetNamedQuery("SEL_COUNT")
.SetParameter("V_USER_ID", userID);
return query.UniqueResult<Int32>();
}
我收到此错误:
错误[HY000] [Oracle] [ODBC] [Ora] ORA-06550:第1行,第7列:
PLS-00306:调用&#39; SEL_COUNT&#39;错误的参数数量或类型 ORA-06550:第1行第7栏:
PL / SQL:忽略语句
这是存储过程:
create or replace
PROCEDURE SEL_COUNT
(
V_DebtorCount OUT NUMBER,
V_USER_ID IN VARCHAR2
)AS
BEGIN
SELECT Count(*) INTO V_DebtorCount FROM DBR d
JOIN YCLI ON DBR_ENT = US_CLI
where USR_CODE=V_USER_ID
END SEL_COUNT;