Possible DBD::DB2 driver bug?

From: Sean C Peters (speters_at_wiredata.com)
Date: 06/29/04


To: dbi-users@perl.org
Date: Tue, 29 Jun 2004 11:45:27 -0500

HI all,
I have run into a strange problem using the DBD::DB2 drivers.

Running a SELECT query thats grabs some data that includes a column defined as
DECIMAL(14). When the $handle->fetchrow_array() occurs, we get the following
error:

DBD::DB2::st fetchrow_array failed: IBMCLI DriverDB2/SUN64 SQL0413N Overflow
occured during numeric data type conversion. SQLSTATE=22003

If RaiseError is not set on the DB handle, i can trap the error by checking
the value of $DBI::err, but if RaiseError is set, i cant trap the error with
eval{}

I have almost no experience with DBI::DB2 (i usually use DBI::MySQL), so i may
not fully understand whats happening.

I believe that its in the translation from the DECIMAL(14) to a perl string.
I say this because: Reading O'Reilly's Programming the Perl DBI, in Appendix
B, section DBD::DB2 (page 246 in my copy), the statement "Notice that DB2
supports numbers outside the typicalvalid range for perl numbers. This isn't
a major problem because DBD::DB2 always returns all numbers as strings."

Please let me know if you need more information, i'll see what i can get.

I am not subscribed to this list, so please respond personally.

thanks much,
Sean Peters
speters@wiredata.com



Relevant Pages

  • Re: Parsing Huge File
    ... I have a strange problem. ... I'd get Perl to say exactly *why* it "refused to open the file" before introducing further complications like `cat`. ... Perhaps a side effect of your script changes the run-time environment for the re-run. ... Still it is unusual to get no messages, have you been assiduous in checking for errors in all statements that can potentially report run-time errors? ...
    (comp.lang.perl.misc)
  • Re: Problem with syslog and perl
    ... AG> I'm pondering on a strange problem using the Sys::Syslog module with Perl ... AG> 5.6.1 on AIX 4.3.3: ... AG> On our testing and production machines, ...
    (comp.unix.aix)
  • Parsing Huge File
    ... I have a strange problem. ... I have a flat file of about 6 million rows, ... The problem is that, at times, Perl just stops after reading 3,334,601 ... And this is not a problem whih ...
    (comp.lang.perl.misc)
  • Problem with syslog and perl
    ... I'm pondering on a strange problem using the Sys::Syslog module with Perl ... on our development system everything works fine, all log messages from perl ...
    (comp.unix.aix)