Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: DBI can't catch error

by gepebril69 (Scribe)
on Nov 26, 2012 at 13:54 UTC ( #1005664=note: print w/replies, xml ) Need Help??


in reply to Re: DBI can't catch error
in thread DBI can't catch error

ok, that easy.

So simplified it will be something like

# Connect to MySQL server $Dbh = DBI->connect($DSN, $Config{'MYSQL_USER'}, $Config{'MYSQL_PASSWD +'}, { PrintError => 0, RaiseError => 0 }); # Check if connect went ok if (defined ($Dbh)) { # Good print "Successful connection with DB"; } else { # Problem! print "We had an error connecting to DB: ".$DBI::errstr; exit; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005664]
help
Chatterbox?
[choroba]: It's been reported before
[Discipulus]: ok no big deal anyway..
[Discipulus]: mmh choroba.. my post is not for you, if you do not want your golfing game somehow spoilered for one of the problems. Adviced! ;=)
[Discipulus]: no that i aim to victory anyway..

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2017-10-22 19:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (275 votes). Check out past polls.

    Notices?