Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

Why SQL DOUBLE in preparedStatement truncated number with decimals when persisted in DB with MONEY type column?

$
0
0

Hi, I have a problem on my application. We just migrated our application from SAS 12.5.4 to Sybase Adaptive Server Enterprise 16. All works well from previous version, when we identified a weird behavior. I still don't have clue what the problem is.

 

We use java in our application to connect to the database using jconn4.jar. Here's a code snippet from my application.

PreparedStatement ps =null; ... more code here//

ps.setDouble(12,casualty.getRiskLiabAmt());

 

casualty.getRiskLiabAmt() has value 1.93. But when this is persisted to Database with column type MONEY the value got truncated to 1.

 

I need your help guys. Thanks in advance.


Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>