http://www.brentozar.com/archive/2009/09/whats-on-my-bookshelf/
DBConn.Open(); DBTxn = DBConn.BeginTransaction(); // Set the Connection property of the Command object DBCmd.Connection = DBConn; // Set the text of the Command to the INSERT statement DBCmd.CommandText = "INSERT into employees VALUES ( 15, 'HAYES', 'ADMIN', 6, " + "'17-APR-2002', 18000, NULL, 4)"; // Set the transaction property of the Command object DBCmd.Transaction = DBTxn; // Execute using ExecuteNonQuery because we do not // retrieve a result set DBCmd.ExecuteNonQuery(); // Commit the transaction DBTxn.Commit(); // Close the connection DBConn.Close();













