Hi,

the following error message is being shown in the server error log.

Code:
Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at contact line 257., referer: http://example.com/cgi-bin/contact

The two instances of rollback - each within one of two sub routines - are nowhere near line 257. they are in blocks of code which begin at lines 520 and 727 respectively.

All my rollback sections have the disconnect command in them and are copied from the DBI docs at cpan. (well all except for the disconnect, which I have simply put in after the rollback command. How is that wrong, please.

Code:
eval {

/code here/

 $connect->commit;
   };
   if ($@) {
      warn "Transaction aborted because $@";  print qq($@);
     eval {
       $connect->rollback;  
       $connect->disconnect 
            }; # undo the incomplete changes
      # add other application on-error clean-up code here
      #exit;
(I have also run it with the disconnect command outside the error eval but I continue to get the server logs error).

please help me understand how I should have done it or link me to another good tutorial, please.

bazz