good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: How to suppress print connection error to stderrby mpeppler (Vicar) |
on Feb 27, 2008 at 15:39 UTC ( [id://670663]=note: print w/replies, xml ) | Need Help?? |
The problem is that you specify the database name in the connect() call. DBD::Sybase attempts to "use" the database, and when that fails it reports the error. This is done early in the processing, and DBD::Sybase doesn't correctly handle the PrintError/RaiseError flags at that point (because they get set later in the process). Suggestion: don't specify the database in the DBI->connect() call, and instead run a $dbh->do("use DBNAME") right after the connect. This will properly handle the PrintError/RaiseError settings. Michael
In Section
Seekers of Perl Wisdom
|
|