| Author |
jsp and mysql error
|
Pravin Shirke
Ranch Hand
Joined: Apr 05, 2008
Posts: 146
|
|
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: 32651
|
|
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: 3652
|
|
|
Show us the code. I imagine there's somewhere your converting it to integer.
|
My Blog: Down Home Country Coding with Scott Selikoff
|
 |
 |
|
|
subject: jsp and mysql error
|
|
|