|
|
| j2me solution |
Expert:susmitha
Hi friends, In one of my mobile application i am retrieving latitude .longitude and altitude values in the emulator and storing those values in mysql database via a servlet. i am using double lat = Datainputstreamobject.readDouble(); For example when i entered lat value =87.555657,when i tried display this value in servlet,it is showing 1.506276030234...E-308 But when i tried to insert those values in mysql table,i didn't get any exception but the values inserted will be 0.000000 always. please can anybody send me the solution for this problem i am grateful to you.
Thanks & Regards susmitha |
| Answers |
Hi,
I think you have to truncate the values to 6 decimal points and then insert into database.
Check your sql query, I think your must be passing the value ("1.506276030234...E-308") including the 'E' sign. That's why database is converting the value to zero as it does not 'E'.
Enjoy!!
|
| More Questions |
|
|
Post Answers
Ask Question
Facing Programming Problem?
|
|
|
|
|