Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: How to suppress print connection error to stderr

by mpeppler (Vicar)
on Feb 27, 2008 at 15:39 UTC ( #670663=note: print w/replies, xml ) Need Help??


in reply to How to suppress print connection error to stderr

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

  • Comment on Re: How to suppress print connection error to stderr

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2020-10-30 13:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (279 votes). Check out past polls.

    Notices?