Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Using DBI to extract from 2 databases

by scorpio17 (Canon)
on Apr 24, 2013 at 20:57 UTC ( [id://1030527]=note: print w/replies, xml ) Need Help??


in reply to Re: Using DBI to extract from 2 databases
in thread Using DBI to extract from 2 databases

I'm assuming that RaiseError is on. That causes DBI to "die" if any method results in an error. You use the eval block to trap the error and handle it however you wish. For example, I've found it useful to print out the sql statement if a prepare fails, or the argument list if an execute fails, etc.

The connect statement should look something like this:

$dbh = DBI->connect($dsn, $user, $password, {RaiseError => 1, });

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (9)
As of 2024-04-18 11:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found