in reply to Silencing the grumbling from DBD::ODBC

Does your CGI script explicitly send errors to the browser? I would think those messages would go to your error log, not stdout.

..Theo

  • Comment on Re: Silencing the grumbling from DBD::ODBC

Replies are listed 'Best First'.
RE: Re: Silencing the grumbling from DBD::ODBC
by nop (Hermit) on Sep 28, 2000 at 20:11 UTC
    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.

      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