I do that as a transaction while the connection is open.
For instance (and there's more code than just this, but here's a quick example)
MyConnection = GetSqlConnection(sConnectionString);
MyConnection.Open();
MyCommand = new SqlCommand();
MyTransaction = MyConnection.BeginTransaction();
MyCommand.Transaction = MyTransaction;
// code for the update
// if the update is good...
MyTransaction.Commit();
// if the update didn't work (some kind of error)
catch(Exception e)
{
MyTransaction.Rollback();
}
/// and then close
MyConnection.Close();