My code

my %attr = (
PrintError => 0,
RaiseError => 0
);
my $dbh = DBI->connect($dsn, $user, $pass, \%attr);
unless ($dbh) {
next;
}
my $query = "SHOW DATABASES";

I use
unless ($dbh) {
next;
} and this work fine.

Thanks


09.04.2012 01:22, Jim Gibson написал:
At 12:50 AM +0000 4/9/12, Vyacheslav wrote:
I enabled RaiserError, then script die.
...
my %attr = (
PrintError => 0,
RaiseError => 1
);

Use:

RaiseError => 0

instead so that your script will not raise an exception and die. Then check $dbh->err.



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to