This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have noticed a difference in data returned from the database, after having changed to a DB2 driver of type 4.
The most annoying change - and the one I would like some input on - is this: My application is using Stored Procedures, so I'm using CallableStatement to call the Procedure. Getting data out of the CallableStatement is done by using the different getXxx() methods. When the java.sql.Types is either STRING or DECIMAL, the method getObject(index) is used. This used to work perfectly with the previous driver, but has now changed radicaly with the type 4 driver. When the return value is of type DECIMAL and > 0, the value in my object now has 8 zeroes after the decimal point (i.e. 6.00000000). It used to be just the decimal (i.e. 6). What is a lot worse is, that when the return value is of type DECIMAL and = 0, the value in my object is now 0E-8. It used to be 0.
Can anybody tell me why this is - or better - tell me how to get 'just' 0 instead of 0E-8?