Eric Anderson wrote:
I have some java code like this
public float getTimetaken(){
float retVal = 0;
long tempVal;
tempVal = (System.currentTimeMillis() -
last_checked_time.getTime());
retVal = (float) tempVal / 1000;
last_checked_time.setTime(System.currentTimeMillis());
System.out.println(tempVal+" " + retVal); return retVal ;
}
mapping is like this
<field name="time_taken" type="float"><sql name="time_taken" type="float"/></field>
tempVal is always a 4 digit number, and retVal is always 3 or less decimal places (which it should be x / 1000)).
But when it updates the database it alwasy get float values many decmial places (like 10) that have added values. Anyone know why?
Eric,
What database are you using? Also, please post the DDL for that table. I'd like to look at the precision for the field in the DDL.
Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\\"F9E<G)E=\\$\\!F<FEI+F-O;0\\`\\`");'
The Castor Project http://www.castor.org/
Apache Geronimo http://incubator.apache.org/projects/geronimo.html
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
