rafeco
|
11
|
 |
|
01-04-2005 09:51 AM ET (US)
|
|
Sure, I understand how floating point numbers work. Fortunately, both Java (through the BigDecimal class) and MySQL (through the DECIMAL) data type support fixed point numbers. The question was how to get a BigDecimal in Java into a DECIMAL field in MySQL without fouling things up.
I had two problems. The first was that I was inserting as a number rather than as a string in my example below (thus causing a floating point conversion). The second was that I was defining my field improperly.
|