title: ADO.NET: Do you need to Rollback a transaction?
body: <p>Consider the following code which does not rollback the transaction if an exception is caught.</p>
  
  <pre><code>transaction = connection.BeginTransaction();
  command.Transaction = transaction;
  try {
      // interact with database here
  catch {}
  finally {
      connection.Close();
  }
  </code></pre>
  
  <p>What are the consequences of this and is it necessary to rollback the transaction? </p>