in reply to Re: Re: check if databse exists before connection is made!
in thread check if databse exists before connection is made!
my $dbh = DBI->connect( $dsn, $user, $password, { RaiseError => 1 } ); if( ! $dbh ) { print "Ugg, connection problem: $DBI::errstr\n"; } else { eval { $dbh->do( whatever ); $dbh->do( something else ); }; if( $@ ) { print "Ugg, problem: $@\n"; } }
|
|---|