How do I roll back a file checked in to Clearcase?

What is described by skwllsp can be be done in a dynamic view through the use of extended pathnames cd m:/myDynamicView/MyVob/path/to/file cleartool lsvtree myFile cleartool checkout -c “cancel co” myFile copy myFile@@/main/xx myFile cleartool checkin -nc myFile with xx being the version number you want to restore. But should you have made multiple checkins, including … Read more

Will a using statement rollback a database transaction if an error occurs?

Dispose method for transaction class performs a rollback while Oracle’s class doesn’t. So from transaction’s perspective it’s implementation dependent. The using statement for the connection object on the other hand would either close the connection to the database or return the connection to the pool after resetting it. In either case, the outstanding transactions should … Read more

mysql transaction – roll back on any exception

You can use 13.6.7.2. DECLARE … HANDLER Syntax in the following way: DELIMITER $$ CREATE PROCEDURE `sp_fail`() BEGIN DECLARE `_rollback` BOOL DEFAULT 0; DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET `_rollback` = 1; START TRANSACTION; INSERT INTO `tablea` (`date`) VALUES (NOW()); INSERT INTO `tableb` (`date`) VALUES (NOW()); INSERT INTO `tablec` (`date`) VALUES (NOW()); — FAIL IF … Read more

Rails DB Migration – How To Drop a Table?

You won’t always be able to simply generate the migration to already have the code you want. You can create an empty migration and then populate it with the code you need. You can find information about how to accomplish different tasks in a migration here: http://api.rubyonrails.org/classes/ActiveRecord/Migration.html More specifically, you can see how to drop … Read more