in reply to My update on insert error solution

Maybe you just need to dbh->commit (to prevent an automatic rollback)?