DB2 - Problembeschreibung
Problem IC62550 | Status: Geschlossen |
IMPLEMENT NEW FLOATINGPOINTSTRINGFORMAT PROPERTY | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problembeschreibung: | |
After changing the legacy JDBC driver to JCC type 4 driver, customer's java application gets a different format result when using ResultSet.getString() and CallableStatement.getString() for DOUBLE data type. For example, legacy driver: 1.00000000000000E-007 jcc driver: 1.0E-7 JCC driver uses JDK to convert bytes received from the server into a double, while the legacy driver may be using some native language. JCC driver is working as designed, but it's necessary to implement a new JCC property to match the legacy JDBC driver string format for double and real types. | |
Problem-Zusammenfassung: | |
After changing the legacy JDBC driver to JCC type 4 driver, customer's java application gets a different format result when using ResultSet.getString() and CallableStatement.getString() for DOUBLE data type. For example, legacy driver: 1.00000000000000E-007 jcc driver: 1.0E-7 A new datasource / URL property, floatingPointStringFormat, was introduced. The new property allows application to pick the string format of either the IBM Data Server driver (both type 4 and type 2) or the legacy type 2 driver for double, float and real column types. The float column can be defined as float (1-53) where the values 1 through 24 indicate single precision and maps to same as real type and the values 25 through 53 indicates double-precision and maps to double type. The property is applicable only to the output path (i.e. ResultSet.getString() and CallableStatement.getString(). The data type for "floatingPointStringFormat" property is integer and the possible values for the property are - FLOATING_POINT_STRING_FORMAT_NOT_SET (0): if not explicitly set, the default value will be 0 that has the semantics of JCC_DRIVER_FLOATING_POINT_STRING_FORMAT. - JCC_DRIVER_FLOATING_POINT_STRING_FORMAT (1): double and real values will be returned in whatever format java.lang.String. valueOf(double) and java.lang.String.valueOf(float) method returns respectively. - LEGACY_TYPE2_ DRIVER_FLOATING_POINT_STRING_FORMAT (2): double and real values will be returned in legacy type 2 driver format as below. The double types will be returned in the following format d.ddddddddddddddE<sign>ddd where "d" denotes a digit. 1 digit before the decimal point. 14 digits after the decimal point. "E" the exponent. "<sign>" could be "+" or "-". 3 digits after the sign. The real types will be returned in the following format d.ddddddE<sign>ddd where "d" denotes a digit. 1 digit before the decimal point. 6 digits after the decimal point. "E" the exponent. "<sign>" could be "+" or "-". 3 digits after the sign. | |
Local-Fix: | |
Lösung | |
First fixed by V97 FP1. | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 14.08.2009 10.11.2009 10.11.2009 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.7.FP1 | |
Problem behoben lt. FixList in der Version |