in reply to Re: Silencing the grumbling from DBD::ODBC
in thread Silencing the grumbling from DBD::ODBC

How do I ensure errors don't go to stdout? I think this is my problem. Or how do I ask DBI not to complain at all?

Update:      $dbh->{PrintError} = 0; solves the problem, see below.

Replies are listed 'Best First'.
RE: RE: Re: Silencing the grumbling from DBD::ODBC
by jreades (Friar) on Sep 28, 2000 at 23:40 UTC

    Personally, I'd be less that thrilled at the idea of surpressing error output -- it might actually help the user to know that something is wrong.

    I've had some luck (it depends a little on what you want to do) with changing the 'execute or die' syntax to an 'execute or assign the error to a subroutine'.

    Your error subroutine could then distinguish between errors as a result of access levels vs. error as a result of the database itself... and act accordingly.

    Obviously, YMMV