title: How to close connection of Microsoft.Practices.EnterpriseLibrary.Data.ExecuteNonQuery
body: <p>I'm using the library microsoft.practices.enterpriselibrary, to access a SQL Server database.
  I'm wondering how to close connection when I use the ExecuteNonQuery method?</p>
  
  <p>ie:</p>
  
  <pre><code>using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
  
  SqlDatabase db = null;
  try
  {
      db = new SqlDatabase(stringConnection);
      db.ExecuteNonQuery("storedprocedure", someParams);
  }
  catch (Exception ex)
  {
  }
  </code></pre>
  
  <p>I can't do something like </p>
  
  <pre><code>finally
  {
      if (db != null)
      {
          ((IDisposable)db).Dispose();
      }
  }
  </code></pre>
  
  <p>So... how can I avoid connection leaks?</p>
  
  <p>Thank you.</p>