wood burning stoves 2.0*
The moose likes JDBC and the fly likes jsp and mysql error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "jsp and mysql error" Watch "jsp and mysql error" New topic
Author

jsp and mysql error

Pravin Shirke
Ranch Hand

Joined: Apr 05, 2008
Posts: 150

how to insert a decimal value into mysql database.
eg: value like 2.5 to mysql field of datatype float.
but when i try to insert 2.5 from jsp to mysql database it get converted to 2 in the database??


[Vipassana] - It is seeing the reality as it is, And not as you want it to be.!!!
SCJP1.5.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

How is your float defined? How many digits do you allow after the decimal place?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38509
    
  23
I think you will have to provide more detail. What format have you got the 2.5 in, and what sort of variable to you put it into, before inserting it into the database?
How did you specify the float value?
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704
    
    5

Show us the code. I imagine there's somewhere your converting it to integer.


My Blog: Down Home Country Coding with Scott Selikoff
 
wood burning stoves
 
subject: jsp and mysql error