Android Question Problem with double

eades

Member
Licensed User
Longtime User
Hi i have got a problem with my sql lite, when i get the value for an money field with getdouble i get a rounded value. The value in the database is 30,45 but i get with getdouble 30.0
what am i doing wrong?
I have tried the field as string and as real.
 

eades

Member
Licensed User
Longtime User
sorry i thougt it was enough information without code.
cursor.getdouble("price") gave me an rounded amount instead of the exact field value.
i have found the problem, the database has values with the decimal separator , (komma) and must have an decimal separator . (dot)
 
Upvote 0

eades

Member
Licensed User
Longtime User
I have changed the comma's in dots in de original database with delphi and now it's working perfect.
the problem was not how to show it but several values had to be add up.
thanks for your reply Klaus. Have a nice evening
 
Upvote 0
Top