Re: DBD::DB2: handling warnings

Tim Bunce <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
On Tue, Dec 30, 2008 at 12:37:05PM -0500, Hildo Biersma wrote:
> The DBD::DB2 driver does not handle warnings in a manner consistent with 
> other DBD drivers.  Specifically, if the trace level is lower than 3, 
> warnings are ignored; if the trace level is 3 or above, warnings are 
> treated like errors.  The driver also directly manipulates the DBI 
> internals instead of using DBIh_SET_ERR_CHAR.

> It treats all SQL_SUCCESS_WITH_INFO cases as warnings - perhaps these
> should be reported as informational events instead.

Yes, it should. (Just use "" instead of "0".)

The DBI defaults PrintWarn to true, so if SQL_SUCCESS_WITH_INFO is
treated as a warning then they'll get printed - probably not what most
people would want.

Tim.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.