Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2016-08-24 07:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (338 votes). Check out past polls.