Problems with Ref Cursor & Oracle Client

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
ozz232
Posts: 6
Joined: Mon 04 Mar 2013 14:53

Problems with Ref Cursor & Oracle Client

Post by ozz232 » Thu 07 Mar 2013 01:04

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

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Re: Problems with Ref Cursor & Oracle Client

Post by Shalex » Thu 07 Mar 2013 14:18

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.

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Re: Problems with Ref Cursor & Oracle Client

Post by Shalex » Wed 20 Mar 2013 13:54

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:

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>

Shalex
Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Re: Problems with Ref Cursor & Oracle Client

Post by Shalex » Fri 05 Apr 2013 12:16

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.

Post Reply