title: Binding ASP.NET GridView to an Oracle SYS_REFCURSOR
body: <p>We have a Procedure in Oracle with a SYS_REFCURSOR output parameter that returns the data we want to bind to an ASP.NET GridView control. I've seen this done before but I can't find the original reference I used to solve the problem.</p>
  
  <p>Here is what the procedure looks like:</p>
  
  <pre><code>create or replace PROCEDURE GETSOMEDATA
  (
      P_Data OUT SYS_REFCURSOR
  )
  AS
  BEGIN
      OPEN P_Data FOR SELECT * FROM SOMETABLE;
  END GETSOMEDATA;
  </code></pre>
  
  <p>And for now the GridView is just bare-bones:</p>
  
  <pre><code>&lt;asp:GridView ID="grdData" runat="server" AutoGenerateColumns="true"&gt;&lt;/asp:GridView&gt;
  </code></pre>