Just looking for some ideas on what the best way to store and format currency values might be.
I am using SQL 7.0 and have my currency fields defined as float types. In my java, I call and store the value as a float (getFloat() updateFloat()).
What I am finding is when I convert from US dollars to say Turkish Lira, my values either get truncated or formatted into exponential notation. This becomes more of a problem when dealing with larger values (say $5,345,234.99).
I have been toying with the idea of storing everything in US$ and when calling from the database, format the value using java.util.Currency into the correct locale, but I wanted to see if anyone else had a better suggestion.
TIA
I am using SQL 7.0 and have my currency fields defined as float types. In my java, I call and store the value as a float (getFloat() updateFloat()).
What I am finding is when I convert from US dollars to say Turkish Lira, my values either get truncated or formatted into exponential notation. This becomes more of a problem when dealing with larger values (say $5,345,234.99).
I have been toying with the idea of storing everything in US$ and when calling from the database, format the value using java.util.Currency into the correct locale, but I wanted to see if anyone else had a better suggestion.
TIA