Hello,
I am trying to map a stored proc with Ref Cursor as a out parameter.
I am using Oracle Client for the drivers.
Seems like the ref cursor is not being set and am getting error as below.
Please advice what I should do.
Thanks.
// Oracle Procedure Signature
procedure sel_new(
p_ID IN candidate.ID%type DEFAULT NULL,
p_recordset OUT SYS_REFCURSOR
);
// Code generated by Entity Developer
public ObjectResult<CANDIDATE> SEL (string P_ID)
{
ObjectParameter P_IDParameter;
if (P_ID != null)
{
P_IDParameter = new ObjectParameter("P_ID", P_ID);
}
else
{
P_IDParameter = new ObjectParameter("P_ID", typeof(string));
}
return base.ExecuteFunction<CANDIDATE>("SEL", P_IDParameter);
}
// Exception
ORA-06550: line 1, column 8:
PLS-00306: wrong number or types of arguments in call to 'SEL_NEW'
ORA-06550: line 1, column 8:
PL/SQL: Statement ignored
Problems with Ref Cursor & Oracle Client
Re: Problems with Ref Cursor & Oracle Client
1. Please specify the provider you are working with: dotConnect for Oracle or ODP.NET.
2. If it is dotConnect for Oracle, refer to http://blogs.devart.com/dotconnect/work ... rsors.html.
3. If the point 2 doesn't help, send us the DDL script of your sel_new procedure and related objects so that we can reproduce the problem in our environment.
2. If it is dotConnect for Oracle, refer to http://blogs.devart.com/dotconnect/work ... rsors.html.
3. If the point 2 doesn't help, send us the DDL script of your sel_new procedure and related objects so that we can reproduce the problem in our environment.
Re: Problems with Ref Cursor & Oracle Client
Adding information to application's *.config file about cursors used in the model is implemented (when ODP.NET is used). We will post here when the corresponding build of Entity Developer is available for download.
As a temporary workaround, you can add the corresponding information to application's *.config manually. Here is an example:
As a temporary workaround, you can add the corresponding information to application's *.config manually. Here is an example:
Code: Select all
<configuration>
<connectionStrings>
<add name="SCOTTEntitiesConnectionString" connectionString="metadata=res://*/DataModel1.csdl|res://*/DataModel1.ssdl|res://*/DataModel1.msl;provider=Oracle.DataAccess.Client;provider connection string="USER ID=scott;PASSWORD=****;DATA SOURCE=ORCL1120;PERSIST SECURITY INFO=True""
providerName="System.Data.EntityClient" />
</connectionStrings>
<oracle.dataaccess.client>
<settings>
<add name="SCOTT.SEL_NEW.RefCursor.P_RECORDSET" value="implicitRefCursor bindinfo='mode=Output'" />
</settings>
</oracle.dataaccess.client>
</configuration>
Re: Problems with Ref Cursor & Oracle Client
New version of Entity Developer 5.5 is released!
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=32&t=26309.
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=32&t=26309.