title: Using Entity Framework to call Oracle stored procedure VANCE_TEST, I get PLS-00302: component 'VANCE_TEST' must be declared
body: <p>I've been through all the similar questions I've been able to find on this without success.  </p>
  
  <p>In Visual Studio 2010, I'm creating an MVC web app that calls an Oracle stored procedure.  I've been unable to even call a very simple stored procedure.  This is the simple stored procedure:</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE VANCE_TEST ( PARTNERS OUT sys_refcursor ) AS
  BEGIN
    OPEN PARTNERS FOR SELECT COMPANY_NAME, SUN FROM PARTNER WHERE MARKET_IDX = 16;
  END;
  /
  </code></pre>
  
  <p>Both columns are Varchar2 type.  When I call the procedure from SQL*Plus, it works fine using this code:</p>
  
  <pre><code>var rc refcursor
  execute VANCE_TEST( :rc );
  print rc;
  </code></pre>
  
  <p>In my web.config file I have the following specification, to define the stored procedure's cursor:</p>
  
  <pre><code>  &lt;oracle.dataaccess.client&gt;
      &lt;settings&gt;
        &lt;add name="PARTNER.VANCE_TEST.RefCursor.PARTNERS" value="implicitRefCursor bindinfo='mode=Output'" /&gt;
        &lt;add name="PARTNER.VANCE_TEST.RefCursorMetaData.PARTNERS.Column.0" value="implicitRefCursor metadata='ColumnName=COMPANY_NAME;BaseSchemaName=PARTNER;BaseTableName=PARTNER;NativeDataType=Varchar2;ProviderType=Varchar2;ProviderDBType=String;DataType=System.String;ColumnSize=100;AllowDBNull=true'" /&gt;
        &lt;add name="PARTNER.VANCE_TEST.RefCursorMetaData.PARTNERS.Column.1" value="implicitRefCursor metadata='ColumnName=SUN;BaseSchemaName=PARTNER;BaseTableName=PARTNER;NativeDataType=Varchar2;ProviderType=Varchar2;ProviderDBType=String;DataType=System.String;ColumnSize=10;AllowDBNull=true'" /&gt;
      &lt;/settings&gt;
    &lt;/oracle.dataaccess.client&gt;
  </code></pre>
  
  <p>This worked fine when I did the Add Function Import, and VS was able to create a complex type VANCE_TEST_Result for returned data.  PARTNER is the schema name, and Add Function Import could not see the columns returned until I added it before VANCE_TEST.</p>
  
  <p>In my program, which has no trouble doing Linq queries against the PARTNER table using Models.Entities, I have the following code:</p>
  
  <pre><code>using (Models.Entities db = new Models.Entities())
  {
      IEnumerable&lt;Models.VANCE_TEST_Result&gt; results = db.VANCE_TEST();
  </code></pre>
  
  <p>When I execute it, I get an exception inside db.VANCE_TEST():</p>
  
  <pre><code>public ObjectResult&lt;VANCE_TEST_Result&gt; VANCE_TEST()
  {
      return base.ExecuteFunction&lt;VANCE_TEST_Result&gt;("VANCE_TEST");
  }
  </code></pre>
  
  <p>ExecuteFunction (which I can't trace into) throws an Oracle.DataAccess.Client.OracleException that has a multi-line error from Oracle:</p>
  
  <pre><code>ORA-06550: line 1, column 17: 
  PLS-00302: component 'VANCE_TEST' must be declared 
  ORA-06550: line 1, column 7: 
  PL/SQL: Statement ignored
  </code></pre>
  
  <p>Any hints about what's going on here?  Or how I can get the actual SQL code that is being sent across?  I've tried to learn from this other Stackoverflow article and do mine as much as possible like it once they got the problems solved:</p>
  
  <p><a href="https://stackoverflow.com/questions/9881091/oracle-stored-proc-call-returning-exception-ora-06550-with-pls-00103">Oracle stored proc call returning exception ORA-06550 with PLS-00103</a></p>
  
  <p>Thanks in advance for any light you can shed on this.</p>