in reply to Re: Re: check if databse exists before connection is made!
in thread check if databse exists before connection is made!

Uhh .. errr ... uhhh ... check for return values and do what you need to? Basically, you're doing a bunch of stuff without checking return values. Also, you have RaiseError set on one of your connects so you could wrap the code inside an eval.

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"; } }
-derby