title: Setting FetchSize and InitialLOBFetchSize with Enterprise Library
body: <p>I'm migrating code that uses ADO.NET/ODP.NET to Enterprise Library 6.0. I'm using the EntLibContrib project that adds support for ODP.NET. There are some optimizations made in the ADO.NET code and I'm trying to determine how to call those properties with EL. </p>
  
  <p>The ADO.NET looks like this:</p>
  
  <pre><code> using (OracleConnection conn = new OracleConnection(_connectionString))
   {
       using (OracleCommand cmd = new OracleCommand(command, conn))
       {
            cmd.CommandType = CommandType.Text;
            cmd.InitialLOBFetchSize = -1;
  
            cmd.Connection.Open();
            OracleDataReader reader = cmd.ExecuteReader();
            reader.FetchSize = reader.RowSize * 1000;
            reader.Read();
  
           [...]
      }
  }
  </code></pre>
  
  <p>EL code looks like:</p>
  
  <pre><code>var database = new DatabaseProviderFactory().CreateDefault();
  
  using (var reader = database.ExecuteReader(CommandType.Text, command))
  {
   [...]
  }
  </code></pre>
  
  <p>I'm also updating Stored Procedures as well here are the examples.</p>
  
  <p>ADO.NET:</p>
  
  <pre><code>using (OracleConnection conn = new OracleConnection(_connectionString))
  {
    using (OracleCommand cmd = new OracleCommand(command, conn))
    {
      cmd.CommandType = CommandType.StoredProcedure;
      cmd.Parameters.Add("pID", OracleDbType.Int32).Value = eID;
      OracleParameter pResults = cmd.Parameters.Add("pResults", OracleDbType.RefCursor, ParameterDirection.Output);
  
      cmd.Connection.Open();
      cmd.ExecuteNonQuery();
  
      using (OracleRefCursor cursor = pResults.Value as OracleRefCursor)
      {
          using (OracleDataReader reader = cursor.GetDataReader())
          {
             reader.FetchSize = reader.RowSize * 1000;
  
             while (reader.Read())
             {
               [...]
             }
  </code></pre>
  
  <p>To EL:</p>
  
  <pre><code>var database = new DatabaseProviderFactory().CreateDefault();
  
  using (var reader = database.ExecuteReader("SS.SP_GET_TASKDATA_BY_PRAC", practiceID, firstRow, lastRow))
  {
    while (reader.Read())
    {
       [...]
    }
  </code></pre>
  
  <p>How do I set the FetchSize and InitialLOBFetchSize properties with my EL code?</p>