This discussion is archived
0 Replies Latest reply: Jun 18, 2012 7:01 AM by 944336 RSS

Stored Procedures with Entity - "wrong number or types of argument"

944336 Newbie
Currently Being Moderated
Hi All,

This appears to be a bit of a common issue but I can't find a solution that works for me.

I'm trying to return a Cursor from a Stored Procedure using Entity.

This is a basic example of what I'm trying to do. I've tried with a few different procedures and I get the same error each time.

PROCEDURE "RISK_GETALLCHANNELSNEW" (P_CUROSR OUT SYS_REFCURSOR)
IS
BEGIN
OPEN P_CUROSR FOR
SELECT r.ChannelId, r.Name, CASE WHEN r.active = 1 THEN 'Active' ELSE 'InActive' END AS "Active", r.domain
FROM risk_channel r;
END RISK_GETALLCHANNELSNEW;

I have the app.config setup with the following columns and the Function Import finds all of the columns correctly.

<add name="GBB.RISK_GETALLCHANNELSNEW.RefCursor.P_CURSOR" value="implicitRefCursor bindinfo='mode=Output'" />
<add name="GBB.RISK_GETALLCHANNELSNEW.RefCursorMetaData.P_CURSOR.Column.0"
value="implicitRefCursor metadata='ColumnName=ChannelId;
BaseColumnName=ChannelId;BaseSchemaName=GBB;BaseTableName=Risk_channel;
NativeDataType=varchar2;ProviderType=Varchar2;ProviderDBType=String;
DataType=System.String;ColumnSize=100;AllowDBNull=false;IsKey=true'" />
<add name="GBB.RISK_GETALLCHANNELSNEW.RefCursorMetaData.P_CURSOR.Column.1"
value="implicitRefCursor metadata='ColumnName=ChannelName;
BaseColumnName=name;BaseSchemaName=GBB;BaseTableName=Risk_channel;
NativeDataType=varchar2;ProviderType=Varchar2;ProviderDBType=String;
DataType=System.String;ColumnSize=100;AllowDBNull=true;IsKey=false'" />
<add name="GBB.RISK_GETALLCHANNELSNEW.RefCursorMetaData.P_CURSOR.Column.2"
value="implicitRefCursor metadata='ColumnName=Active;
NativeDataType=varchar2;ProviderType=Varchar2;ProviderDBType=String;
DataType=System.String;ColumnSize=100;AllowDBNull=true;IsKey=false'" />
<add name="GBB.RISK_GETALLCHANNELSNEW.RefCursorMetaData.P_CURSOR.Column.3"
value="implicitRefCursor metadata='ColumnName=Domain;
NativeDataType=varchar2;ProviderType=Varchar2;ProviderDBType=String;
DataType=System.String;ColumnSize=100;AllowDBNull=true;IsKey=false'" />


When I run the following line "var channels = context.RISK_GETALLCHANNELSNEW();" I get the following error.


boldORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'RISK_GETALLCHANNELSNEW'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

Any help would be greatly appreciated!

If you need more information let me know.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points