Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: DB Error Handling Not Working

by poj (Parson)
on Aug 13, 2014 at 19:13 UTC ( #1097331=note: print w/replies, xml ) Need Help??


in reply to Re^2: DB Error Handling Not Working
in thread DB Error Handling Not Working

Sorry, the connection string should be DBI->connect($data_source, $username, $password, \%attr) so either use
my $dbh = DBI->connect("DBI:ODBC:$DSN",'','', {RaiseError => 1, PrintError => 1}) or die (Error connecting " $DBI::errstr");
or move the username/password out of the $DSN.
poj

Update : To get current date/time you could just use
my ($now) = $dbh->selectrow_array('SELECT CURRENT_TIMESTAMP');

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1097331]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2016-12-11 05:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (168 votes). Check out past polls.