Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing function with multiple ref cursors in Stored Procedure of Oracle 12c database Using EF6 #16

Open
Dharma1986 opened this issue Mar 27, 2015 · 1 comment

Comments

@Dharma1986
Copy link

Hi Good day!

I can able to import function for stored procedure of oracle db and able to add the complex type and get the output but i tried to import the procedure which having two ref cursors and unable to retrieve the column information. Only able to retrieve the columns of first ref cursor. Please help me to get the result of two ref cursors which acting as out parameters.

below is the my oracle db sp

procedure ibp_countrystate_getlist
          (       
           p_country_id   in     number,           
           p_cntry_getlist out   SYS_REFCURSOR,
           p_state_getlist out   SYS_REFCURSOR
           )as
 begin
      open   p_cntry_getlist  for      
        select country_pid,country_code,country_name,country_fname
        from     ibt_country_master
        where     country_pid=p_country_id
        and       country_status in ('A','D');

     open p_state_getlist for    
        select state_pid,state_code,state_name,state_country_id
        from  ibt_state_master
        where state_country_id=p_country_id
        and state_status in('A','D');
 end;

and my web.config for refursor configuration is below..

<storedProcedure schema="C##TEST" name="IBP_COUNTRYSTATE_GETLIST">
          <refCursor name="P_CNTRY_GETLIST">
            <bindInfo mode="Output" />
            <metadata columnOrdinal="0" columnName="COUNTRY_PID" providerType="Decimal" allowDBNull="false" nativeDataType="Number" />
            <metadata columnOrdinal="1" columnName="COUNTRY_CODE" providerType="Varchar2" allowDBNull="true" nativeDataType="Varchar2" />
            <metadata columnOrdinal="2" columnName="COUNTRY_NAME" providerType="Varchar2" allowDBNull="true" nativeDataType="Varchar2" />
            <metadata columnOrdinal="3" columnName="COUNTRY_FNAME" providerType="Varchar2" allowDBNull="true" nativeDataType="Varchar2" />
          </refCursor>
          <refCursor name="P_STATE_GETLIST">
            <bindInfo mode="Output" />
            <metadata columnOrdinal="0" columnName="STATE_PID" providerType="Decimal" allowDBNull="false" nativeDataType="Number" />
            <metadata columnOrdinal="1" columnName="STATE_CODE" providerType="Varchar2" allowDBNull="true" nativeDataType="Varchar2" />
            <metadata columnOrdinal="2" columnName="STATE_NAME" providerType="Varchar2" allowDBNull="true" nativeDataType="Varchar2" />
            <metadata columnOrdinal="3" columnName="STATE_COUNTRY_ID" providerType="Decimal" allowDBNull="false" nativeDataType="Number" />
          </refCursor>
        </storedProcedure>
@krptodr
Copy link

krptodr commented Jul 6, 2018

What about returning a refcursor and a normal variable like a long?

procedure ibp_countrystate_getlist
          (       
           p_country_id   in     number,           
           SOME_ID     OUT LONG,
           p_cntry_getlist out   SYS_REFCURSOR,
           p_state_getlist out   SYS_REFCURSOR
           )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants