db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alvaro Coronel <alvarocorone...@yahoo.com>
Subject Re: BigDecimal and MySQL decimal
Date Thu, 14 Dec 2006 12:24:20 GMT
I have had no trouble using it just as you do. Maybe you haven't set the scale yet.

This is an excerpt of my schema.xml file:

<column name="moncotiza" 
             type="DECIMAL" />

What I usually do is to define the schema.xml file and from it obtain the .sql file via ant
to create the database.

Good luck,

Jon August <jon@internection.com> wrote: Hey,

I'm using decimal (in the schema) to store a dollar amount in my  
MySQL database.  I get the value from a web page and convert it to a  
BigDecimal before storing it.  For some reason, the decimal portion  
gets truncated and $10.32 gets stored as 10.  Should I be using  
something other than BigDecimal or is there something else wrong?

Sorry if this is not a torque question.


To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

Want to start your own business? Learn how on Yahoo! Small Business.
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message