NamedParameterJdbcTemplate jconnect decimal issue

Posted by user1052849 on Stack Overflow See other posts from Stack Overflow or by user1052849
Published on 2011-11-18T00:02:00Z Indexed on 2011/11/21 9:50 UTC
Read the original article Hit count: 394

Filed under:
|
|
|

I am using NamedParameterJdbcTemplate to insert data into a table. (Spring 2.5.3/Java 1.6) I am using jconnect driver to connect to sybase jdbc:sybase:Tds:<Server>:<Port>. For some reason the decimal values the decimal part is truncated.

With the same code if I use jtds driver (jdbc:jtds:sybase://<Servername>:<Port>) its working fine.

I cannot use jtds as jconn is being used by other code.

In Java objects, field is defined as double. In database, field is defined as float (numeric with precision does not work).

Any help is appreciated.

© Stack Overflow or respective owner

Related posts about java

Related posts about jdbc