473,480 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DBD::DB2 Bug - negative REAL causes Numeric value out of range

(copied to comp.databases.ibm-db2)

Greetings,

Settings:

DBD::DB2 v0.76
DBI v1.38
Perl v5.8.0
IBM DB2 ESE v8.1 sp 4
RedHat Linux 9

Problem:

I am doing DB2 access via perl DBI but have trouble with fetching negative REAL value:

i.e. SELECT X FROM TABLE FETCH FIRST ROWS ONLY;

In this case, X is "-1" and the query should return "-1". But instead I have this error message and no data retrieved:

[error] DBD::DB2::st fetchrow_array failed: [IBM][CLI Driver] CLI0111E Numeric value out of range. SQLSTATE=22003

The same SQL works fine in command line mode. As you may know, REAL is 4 byte single-precision float-point in DB2. The value can be:

zero, or
-3.402E+38 to -1.175E-37, or
1.175E-37 to -3.402E+38.

In DBD::DB2, it should map to SQL_REAL ($sth->{TYPE} returns data type 7). But instead, I haven't found anything in the module. It seems all the postive values of REAL work fine and so does any converted DOUBLE and CHAR. To prove this, I have tested these SQL statements:

SELECT abs(X) FROM TABLE FETCH FIRST ROWS ONLY;
SELECT double(X) FROM TABLE FETCH FIRST ROWS ONLY;
SELECT char(X) FROM TABLE FETCH FIRST ROWS ONLY;

All of them work properly with DBD::DB2. Thus I believe this is a BUG. Could anyone please advice?

Many thanks in advance,

Bing

Nov 12 '05 #1
0 3047

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2048
by: Hemant Shah | last post by:
Folks, I have DB2 UDB 7.2 EE installed on AIX 5.2 system. I think I am at latest fixpack, see output of lslpp below. I have also installed DB2 UDB 7.2 EE on RedHat Linux 7.3 I believe that is...
0
1323
by: Philip Nelson | last post by:
Noticed today that there have been two new versions of the DB2 driver released over the last week.   This is the first time IBM has released an update since October 2001, so to give us...
1
1783
by: Larry | last post by:
I'm having problems getting any CLI trace info from my Perl script (which uses DBI and DBD::DB2). I did: db2 update cli cfg for section common using trace 1 db2 update cli cfg for section...
2
1741
by: bastb | last post by:
Hi, We've been using the perl DBD::DB2 driver on Perl version 5.8.0 (aix_thread_multi) for a project we're working on without any problems until now. We've been using DBD::DB2 version 0.78 on...
4
2409
by: Larry | last post by:
I have a Perl script using DBD::DB2, that runs during system startup on a Solaris system. The script is working fine during startup on many machines, except on one machine it fails complaining...
0
1405
by: Hemant Shah | last post by:
Folks, Here is my setup: DB2 V8.2 ESE running on Linux with utf-8 code set. Database territory = us Database code page ...
2
4749
by: Evie | last post by:
I'm attempting to connect to a DB2 database using perl DBD::DB2. I'm consistently getting the following error: SQL1042C An unexpected system error occurred. SQLSTATE=58004 What I have...
1
3234
by: lucybridges | last post by:
Can anyone shed some light on what is causing this, please? Using Perl 5.8.5 (64 bit) on RH enterprise Linux AS release 4 (2.6.9-22.ELsmp) I'm receiving the following error: DBI...
3
2700
by: roxrox_1959 | last post by:
I'm attempting to connect to a DB2 database using DBD::DB2 running on a Linux device. I'm getting the following error: ** connect: Unable to get database handle: DBI...
0
7041
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7044
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
6929
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5337
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4779
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
2995
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.