QuickTopic (SM) free message boards QuickTopic (SM) free message boards
Skip to Messages
  Sign In to access your topic list  |New Topic |My Topics|Profile
Upgrade to Pro   Customize, show pictures, add an intro, and more:   QuickTopic Pro...and check out QuickThreadSM
Topic: Storing fixed point numbers in MySQL
Views: 3365, Unique: 1688 
Subscribers: 1
What's
this?
Printer-Friendly Page
Subscribe to get & post, or stop messages by email Subscribe
All messages    << 12-16  11-11 of 16  1-10 >>
About these ads
Who | When
Messagessort recent-bottom   
Post a new message
 
rafecoPerson was signed in when posted  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.
RSS link What's this?
All messages    << 12-16  11-11 of 16  1-10 >>
QuickTopicSM message boards
Over 200,000 topics served
Learn more Frequently asked questions  Acknowledgements
What they're saying about QuickTopic
 Questions, comments, or suggestions? Contact Us
Read our use policy before beginning. We value your privacy; please read our privacy statement.
Copyright ©1999-2008 Internicity Inc. All rights reserved.