Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: if database connection failed try to reconnect

by andal (Hermit)
on Mar 14, 2011 at 12:26 UTC ( #893082=note: print w/ replies, xml ) Need Help??


in reply to if database connection failed try to reconnect

Just don't use "or die" in your code. Use something like

my $cnx = DBI->connect(); if(defined $cnx) { # success } else { # try another address }


Comment on Re: if database connection failed try to reconnect
Download Code
Replies are listed 'Best First'.
Re^2: if database connection failed try to reconnect
by gskoli (Novice) on Mar 14, 2011 at 14:16 UTC
    Thanks

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://893082]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2015-08-29 03:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (342 votes), past polls