Hope this helps$sth->execute($sqla) or failover($sth->errstr); sub failover() { my $error = shift; $dbh->rollback # If needed; $dbh->disconnect; $mailbody .= "Cannot insert into $database : $error\n"; }
In reply to Re: trapping database errors
by jobber
in thread trapping database errors
by venki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |