Note that there are some explanatory texts on larger screens.

plurals
  1. POEntity Framework and Oracle Client - Issue with stored procedure
    primarykey
    data
    text
    <p>I am using Entity Framework with Oracle in a project and trying to call a stored procedure from EF. The procedure goes as</p> <pre><code>Create or Replace Procedure usp_RotaPlateProductie_Select( p_afdelingId in varchar2, p_productTypeId in varchar2, p_productieData out sys_refcursor) IS Begin Open p_productieData for Select rp.Batchnummer, cppo.Productnummer, p.Omschrijving, pra.Bruto_In_Meters From Rotaplateproductie rp inner join Productieresultaatrtplrol pra on rp.Batchnummer = pra.Batchnummer inner join Cpiplusproductieorder cppo on pra.ProductieNummer = cppo.ProductNummer inner join Product p on cppo.Productnummer = p.Productnummer Where rp.Afdelingid = p_afdelingId and rp.producttype = p_productTypeId; END; </code></pre> <p>But when EF executes the function I am getting the error below</p> <pre><code>ORA-06550: line 1, column 8: PLS-00306: wrong number or types of arguments in call to 'USP_ROTAPLATEPRODUCTIE_SELECT. ORA-06550: line 1, column 8: PL / SQL: Statement IGNORED. </code></pre> <p>I am calling this procedure using the below code</p> <pre><code>public ObjectResult&lt;RotaPlateProductie&gt; Search_RotaPlateProductie(global::System.String p_AFDELINGID, global::System.String p_PRODUCTTYPEID) { ObjectParameter p_AFDELINGIDParameter; if (p_AFDELINGID != null) { p_AFDELINGIDParameter = new ObjectParameter("P_AFDELINGID", p_AFDELINGID); } else { p_AFDELINGIDParameter = new ObjectParameter("P_AFDELINGID", typeof(global::System.String)); } ObjectParameter p_PRODUCTTYPEIDParameter; if (p_PRODUCTTYPEID != null) { p_PRODUCTTYPEIDParameter = new ObjectParameter("P_PRODUCTTYPEID", p_PRODUCTTYPEID); } else { p_PRODUCTTYPEIDParameter = new ObjectParameter("P_PRODUCTTYPEID", typeof(global::System.String)); } return base.ExecuteFunction&lt;RotaPlateProductie&gt;("Search_RotaPlateProductie", p_AFDELINGIDParameter, p_PRODUCTTYPEIDParameter); } </code></pre> <p>Here RotaPlateProductie is the entity from which I am binding the result set Please help.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload