title: The C# using statement, SQL, and SqlConnection
body: <p>Is this possible using a using statement C# SQL?</p>
  
  <pre><code>private static void CreateCommand(string queryString,
      string connectionString)
  {
      using (SqlConnection connection = new SqlConnection(
                 connectionString))
      {
          SqlCommand command = new SqlCommand(queryString, connection);
          command.Connection.Open();
          command.ExecuteNonQuery();
      }
  }
  </code></pre>
  
  <p>What if there’s a error while opening the connection?</p>
  
  <p>The using statement is try and finally<br>
   No catch</p>
  
  <p>So if I catch outside the using brackets will the catch catch the connection opening error?</p>
  
  <p>If not, how to implement this with using the <code>using</code> statement a shown above?</p>