Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How to suppress print connection error to stderr

by mpeppler (Vicar)
on Feb 27, 2008 at 15:39 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://670663]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-19 16:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found