CC: | <morten_bjoernsvik [...] yahoo.no> |
Subject: | DBD::DB2 supress warnings and sqlstate |
Date: | Tue, 15 Jun 2010 11:44:45 +0200 |
To: | <bug-DBD-DB2 [...] rt.cpan.org> |
From: | Morten Bjørnsvik <morten.bjornsvik [...] experian-da.no> |
Hi all
I need a way to supress warnings like the one below in DBD::DB2:
[ERROR:28586] 2010/06/15 10:57:34 /opt/s3/server/S3DB.pm:1716 - psql() - errstr(): [IBM][CLI Driver][DB2/LINUXX8664] SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table. SQLSTATE=02000
, err(): for sql:"delete from nodehost where host like('192.168.2.31:%') and host not like('192.168.2.31:5555')"
I see that $dbh::err() eq '' when we get a warning $sth->errstr() hosts the warning description, but where do it get the SQLSTATE or warningid so I can map
what warnings to supress? browsing the $sth->errstr() may be too slow.
I really miss a section on this in the DBD::DB2 perldoc.
the perldoc is empty on both supress warnings and sqlstate:
http://search.cpan.org/~ibmtordb2/DBD-DB2-1.78/DB2.pod
Thanks
--
----------------------------------------------------------------
Morten Bjørnsvik, Developer Experian Decision Analytics AS
----------------------------------------------------------------