title: Oracle stored Procedure to return multiple resultsets to .net
body: <p>I have written the following stored procedure to return multiple data sets to my front end .Net application</p>
  
  <pre><code>create or replace PROCEDURE GET_EMPLOYEE_INFO 
  (
    EMP_NO IN VARCHAR2,
    E_RECORD_SET1 OUT SYS_REFCURSOR,
    E_RECORD_SET2 OUT SYS_REFCURSOR,
    E_RECORD_SET3 OUT SYS_REFCURSOR,
    E_RECORD_SET4 OUT SYS_REFCURSOR
  ) AS 
  BEGIN
    OPEN E_RECORD_SET1 FOR
      SELECT * FROM EMP.EMPLOYEES;
  
    OPEN E_RECORD_SET2 FOR
      SELECT * FROM EMP.CITIES;
  
    OPEN E_RECORD_SET3 FOR
      SELECT * FROM EMP.STATES;
  
    OPEN E_RECORD_SET1 FOR
      SELECT * FROM EMP.DURATION;
  </code></pre>
  
  <p>Each query executes correctly on its own.  When I execute the stored procedure, it displays the result sets but I don't believe that all the data is being fetched.  At the bottom, it still says "RUNNING IDE CONNECTION".</p>
  
  <ul>
  <li>Is the procedure looping?</li>
  <li>Is there a limitation regarding the <code>SYS_REFCURSOR</code> type?</li>
  <li>Do I need to close these cursors?</li>
  </ul>