2 Replies Latest reply: Jun 18, 2012 9:15 AM by 858110 RSS

    Manually adding entries into app.config for Oracle Stored proc for entity f

    926487
      Manually adding entries into app.config for Oracle Stored proc for entity framework application

      My Oracle proc looks as follows:

      PROCEDURE "GET_SUPPLIERS" (
      SUPP_LIST OUT SYS_REFCURSOR) AS
      BEGIN

      OPEN SUPP_LIST FOR
      SELECT
      SUPPLIER_NAME
      FROM
      A_SUPPLIER ;

      END;
      To get the resultset into my .net Entity framework application, I would have to manually enter the following setting into the app.config of Entity Framework project

      <oracle.dataaccess.client>
      <settings>
      <add name="SYSADM.GET_SUPPLIERS.RefCursor.SUPP_LIST" value="implicitRefCursor bindinfo='mode=Output'" />


      <add name="SYSADM.GET_SUPPLIERS.RefCursorMetaData.SUPP_LIST.Column.0"
      value="implicitRefCursor metadata='ColumnName=SUPPLIER_NAME;
      BaseColumnName=SUPPLIER_NAME;BaseSchemaName=SYSADM;BaseTableName=A_SUPPLIER;
      NativeDataType=varchar2;ProviderType=Varchar2;
      ProviderDBType=String;DataType=System.String;
      ColumnSize=10;AllowDBNull=true'" />


      </settings>
      </oracle.dataaccess.client>
      Is there a more automated way of doing this with out manually adding these type of entries per column?

      What if my stored proc returns 20 columns would I have to manually add 20 entries in the app.config?

      Please let me know.

      Thanks