I am working on application using
Entity Framework 5 in VS-2013, I need to call store procedure from
Oracle packages.
I am using ODP.NET (Managed driver) for connection.
My SP is :
create or replace procedure "GETQUEUES"
(
qID number,
P_RESULTSET OUT SYS_REFCURSOR
)
is
begin
OPEN p_cursor FOR
select *
from QUEUE;
end;
After doing all the required actions like Add Function Import and get column info.
I get this code in Model.Context.cs:
public virtual ObjectResult<SDK_PACKAGE_GETQUEUES_Result> SDK_PACKAGE_GETQUEUES(Nullable<decimal> qID)
{
var qIDParameter = qID.HasValue ?
new ObjectParameter("QID", qID) :
new ObjectParameter("QID", typeof(decimal));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<SDK_PACKAGE_GETQUEUES_Result>("SDK_PACKAGE_GETQUEUES", qIDParameter);
}
My Config :
<oracle.manageddataaccess.client>
<version number="*">
<implicitRefCursor>
<storedProcedure schema="XYZ" name="GETQUEUES">
<refCursor name="P_RESULTSET">
<bindInfo mode="Output" />
<metadata columnOrdinal="0" columnName="QUEUEID" providerType="Decimal" nativeDataType="Number" />
<metadata columnOrdinal="1" columnName="QUEUENAME" providerType="Varchar2" nativeDataType="Varchar2" />
</refCursor>
</storedProcedure>
</implicitRefCursor>
</version>
</oracle.manageddataaccess.client>
Problem is:
When I call and run this code I got this error::
ORA-06550 PLS-00306: wrong number or types of arguments in call to 'GETQUEUES'\nORA-06550
I dnt understand where should I place OUT parameter.