For Oracle stored procedures, entity framework cannot "add function import."

entity-framework oracle recordset stored-procedures

Question

I use the following tools together with Entity Framework:

  1. SP1 for Microsoft Visual Studio 2010 Professional

  2. Oracle's website provides the most recent data provider. (For 32 bit, use ODAC 11.2 Release 4 (11.2.0.3.0)) it was downloaded from http://www.oracle.com/technetwork/topics/dotnet/index-085163.html

  3. 11g Oracle server

My desk is set up as follows.

enter image description here

My stored procedure looks like this:

PROCEDURE "GET_SUPPLIERS" (
    "SUPP_LIST" OUT SYS_REFCURSOR) IS
BEGIN 

    OPEN SUPP_LIST FOR 
    SELECT 
        SUPPLIER_NAME 
    FROM 
        A_SUPPLIER  ;

END;

For my entity framework project, I made the following changes to app.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <connectionStrings>
    <add name="Entities" connectionString="tookitoutfromhere" />
  </connectionStrings>


  <oracle.dataaccess.client>
    <settings>
      <add name="FSDEVTL.GET_SUPPLIERS.RefCursor.SUPP_LIST" value="implicitRefCursor bindinfo='mode=Output'" />
      <add name="FSDEVTL.GET_SUPPLIERS.RefCursorMetaData.SUPPLIER_NAME.Column.0" value="implicitRefCursor metadata='ColumnName=SUPPLIER_NAME;BaseColumnName=SUPPLIER_NAME;BaseSchemaName=FSDEVTL;BaseTableName=A_SUPPLIER;NATIVEDATATYPE=Varchar2;ProviderType=Varchar2'" />
    </settings>
  </oracle.dataaccess.client>


</configuration>

I carry out the following actions:

Model.Store -> Stored Procedures -> GET SUPPLIERS under my.edmx project

Click the saved procedure's right arrow. selecting "add function import" in "GET SUPPLIERS" The names of the stored procedure and the function import are pre-populated. I choose Entities as a supplier, which is the imported Oracle table, under Returns a collection of. The "Get column information" button is what I then click.

"The specified stored method returns no columns" is the result I get.

Thank you.

enter image description here

I want to be able to use entity framework to obtain the recordset from a stored procedure into my.net classes.

Thanks

1
3
3/26/2012 7:35:14 PM

Accepted Answer

Try again after selecting complex under "returns a collection of."

The following example is from the section "Function Imports and Retrieving Implicit Resultsets | Inserting and Updating Data Directly."

http://download.oracle.com/oll/obe/EntityFrameworkOBE/EntityFrameworkOBE.htm#t9

2
6/22/2012 6:16:16 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow