cancel
Showing results for 
Search instead for 
Did you mean: 

Why SQL DOUBLE in preparedstatement truncated whole number when persisted to MONEY type column?

Former Member
0 Kudos
1,488

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 I just identified a weird behavior. I still don't have clue why the problem appears.

We used 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.

Accepted Solutions (0)

Answers (1)

Answers (1)

MarkCulp
Participant
0 Kudos

SAP ASE (aka Adaptive Server Enterprise) is a completely separate database product, unrelated to SQL Anywhere. Questions about ASE should be asked on the appropriate SAP Community Forums, located on SAP SCN.