in reply to Re^2: how do i get the database error from this code
in thread how do i get the database error from this code

Will the error message raised by the dbi simply be in the $@ variable so I can work with that?

Yes. $dbh->err and the like should also be populated.