Link to home
Start Free TrialLog in
Avatar of brashier
brashier

asked on

DB2 result set is adding decimals to integer and all single character fields.

We have noticed a strange problem with a new install.  A little info is needed first....  

We have an old application which only runs in XP and we are in the process of converting it to handle Windows 7.  So we must run this app in XP Mode under Windows 7.  We have installed it like this on several computers with no problems.  On this last install (16 pc's) everything was fine on all except 4 of them.  On these 4 PC's when we do any query, all integer fields and all single character fields get returned with an appended decimal.   I logged into the db2 console and verified the decimal is not in the database.  It seems to be something with db2 driver or ODBC.  The app is written using Delphi 7 and we are using BDE for the Delphi to ODBC bridge. I compared a machine that it works fine on with one of the bad ones and everything in the regional settings are the same.  Both machines have the same copy of the application.

Any help would be great!!
ASKER CERTIFIED SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of brashier
brashier

ASKER

Hi Kent,
  Thanks for the fast response.  Actually I should have mentioned those steps as already checked in my original question.  That was the first thing I checked since that's usually the only thing that can cause our app problems.  Everything seems to be the same.  We copy the db2 driver from a single net share on our server and we only have one copy of it on there so I know that's not the problem.  We have had this app for over 10 years and we have never had this problem.  It's very unusual.
Hi Brashier,

Are you using the DB2 client for your connections or a generic ODBC/JDBC driver?

We are using the DB2 Express 8.1 runtime client.  File name from IBM was FP2_WR21318_RTCL.zip if this helps.  We always open the odbcad32 panel and add a system datasource using the "IBM DB2 ODBC DRIVER" driver.  From there we do the standard config, with no special settings.
i would try to import data using the same odbc driver into excel and see if i get the same problem
Thanks everyone.!!

It appears that the problem was in the ODBC driver binding.  At the time we were setting these pc's up, there were network technicians working on the network so who knows.  I went into the ODBC DB2 driver datasource setup and re-binded the driver and that fixed it.  Kent, you focused my efforts on the ODBC driver and that's why I found the problem, therefore you get the points.  Thanks!  
Excellent help and his questions focused my efforts on the problem area.  His questions are the reason I found  the solution.