Try using RaiseError and an "or die" statement:
my $dbh = DBI->connect( "DBI:mysql:$self->{DB_NAME}:$self->{DB_HOSTNAME}:$self->{DB_PORT}" +, $self->{DB_USERNAME}, $self->{DB_PASSWORD}, { PrintError => 0, RaiseError => 1, } ) or croak DBI->errstr;
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In reply to Re: DBI connect problem
by Ovid
in thread DBI connect problem
by Marcello
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |