Skip Menu |

This queue is for tickets about the DBD-DB2 CPAN distribution.

Report information
The Basics
Id: 58403
Status: open
Priority: 0/
Queue: DBD-DB2

People
Owner: Nobody in particular
Requestors: morten.bjornsvik [...] experian-da.no
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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 ----------------------------------------------------------------
Hi Morten, The tracing in DBD-DB2 driver is in accordance with the DBI spec. The DBD-DB2 driver calls DBIh_SET_ERR_CHAR (DBI API), with necessary details depending on the trace level set. You will not be able to separately get the SQLState information. For details on what suits your needs better check this link http://search.cpan.org/~timb/DBI-1.609/DBI.pm#TRACING which talks of different tracing levels. If your need was that you don't want to see warnings in case where the end of result set is reached (as in the case described), then set your trace level to a value 1 or 2. If set to 3 or above then all these details are expected to be output. -- Thanks Praveen IBM OpenSource Application Development Team India Software Labs, Bangalore (India)
Subject: Automatisk svar ved fravær: [rt.cpan.org #58403] DBD::DB2 supress warnings and sqlstate
Date: Wed, 16 Jun 2010 06:42:22 +0200
To: "IBM OpenDev via RT" <bug-DBD-DB2 [...] rt.cpan.org>
From: Morten Bjørnsvik <morten.bjornsvik [...] experian-da.no>
Hi From 1April to 1july 30June I'm working 2 days a week. I'm replying to your mail shortly. -- Morten Bjoernsvik
Subject: RE: [rt.cpan.org #58403] DBD::DB2 supress warnings and sqlstate
Date: Thu, 17 Jun 2010 08:13:20 +0200
To: <bug-DBD-DB2 [...] rt.cpan.org>
From: Morten Bjørnsvik <morten.bjornsvik [...] experian-da.no>
Hi all But my trace level is 0; DBI->trace(0); I do some more checking. Thanks Praveen. -- MortenB Show quoted text
-----Original Message----- From: IBM OpenDev via RT [mailto:bug-DBD-DB2@rt.cpan.org] Sent: 16. juni 2010 06:42 To: Morten Bjørnsvik Subject: [rt.cpan.org #58403] DBD::DB2 supress warnings and sqlstate <URL: https://rt.cpan.org/Ticket/Display.html?id=58403 > Hi Morten, The tracing in DBD-DB2 driver is in accordance with the DBI spec. The DBD-DB2 driver calls DBIh_SET_ERR_CHAR (DBI API), with necessary details depending on the trace level set. You will not be able to separately get the SQLState information. For details on what suits your needs better check this link http://search.cpan.org/~timb/DBI-1.609/DBI.pm#TRACING which talks of different tracing levels. If your need was that you don't want to see warnings in case where the end of result set is reached (as in the case described), then set your trace level to a value 1 or 2. If set to 3 or above then all these details are expected to be output. -- Thanks Praveen IBM OpenSource Application Development Team India Software Labs, Bangalore (India)