Decimal(Float) missing when saved to Oracle [message #92213] |
Wed, 21 April 2004 06:54 |
Danne
Messages: 2 Registered: April 2004
|
Junior Member |
|
|
When I try to save or update an Oracle NUMBER field with a java Float then all decimal values is cut off? If a number is 12.1 or 12.9 doesnt matter, 12 is saved.
In other statements where a String is saved/updated to an NUMBER- field in db the correct value is saved, with decimals. When I do an "insert into test values(12.5)" in sql+ or TOAD it also works fine so it seems that decimalvalues are cut off when value is bind to statement or when the value is inserted by the class.
How to solve this??
I use PreparedStatement and executeUpdate().
Configuration
--------------------------
Database:
Oracle 9.0.1.1.1
NLS_TERRITORY: AMERICA
NLS_LANGUAGE: AMERICA
NLS_NUMERIC_CHARACTERS: .,
NLS_CHARACTERSET: WE8MSWIN1252
JDBC:
j2sdk1.4.1_07
classes12.jar
WEBSERVER:
Apache 2.0.48 + TOMCAT 4.1.29
|
|
|
|
|
|