title: perl DBD::ODBC rollback ineffective with AutoCommit enabled at
body: <p>I am currently having a block like below. So with this we set autocommit off and and do  a commit/rollback. Now at the rollback line , we are getting a failure saying that "rollback ineffective with AutoCommit enabled at" . How could this happen since AutoCommit was indeed disabled by the begin_work. This problem was not there for a long time and it is suddenly occuring. </p>
  
  <p>On investigating further , i found that the update_sql1 created a #temp table , and update_sql2,update_sql3,update_sql4 query the same #temp table, and are failing with Invalid object name '#temp' error. Immediately control flows to if($@) where $dbh->{AutoCommit} is set to 1. First of all its really wierd as to why update_sql2 and onwards count not find object #temp , when update_sql1 was indeed successful.</p>
  
  <p>Any pointers ?</p>
  
  <p>====</p>
  
  <p>$dbh->db_Main()->begin_work;</p>
  
  <pre><code>eval {
  
   $dbh-&gt;do($update_sql1);
   $dbh-&gt;do($update_sql2);
   $dbh-&gt;do($update_sql3);
   $dbh-&gt;do($update_sql4);
   $dbh-&gt;commit;
   1;
  }
  
  if ($@) {
   $logger-&gt;info("inside catch");
   $logger-&gt;info("autocommit is $dbh-&gt;{AutoCommit}");
   $dbh-&gt;rollback;
  
  }
  </code></pre>
  
  <p>===</p>
  
  <p>Here is the full error message</p>
  
  <pre><code>Issuing rollback() due to DESTROY without explicit disconnect() of DBD::ODBC::db handle ..
  rollback ineffective with AutoCommit enabled ...
  </code></pre>