ThePuiu Active Member Licensed User Longtime User Mar 2, 2013 #1 I have a sqlite database where is a table that contains a field of type decimal (18,13). In it I try to save the contents of an EditText which contain something like 46.7654239810 using: Code: Copy mySQL.ExecNonQuery2("INSERT INTO OBS VALUES (?,?,?)",Array As Object(Null, Latitude.Text.Trim, Longitude.Text.Trim) but the final result (in database) is a number with only 4 decimals.. What is wrong?
I have a sqlite database where is a table that contains a field of type decimal (18,13). In it I try to save the contents of an EditText which contain something like 46.7654239810 using: Code: Copy mySQL.ExecNonQuery2("INSERT INTO OBS VALUES (?,?,?)",Array As Object(Null, Latitude.Text.Trim, Longitude.Text.Trim) but the final result (in database) is a number with only 4 decimals.. What is wrong?
M Mahares Expert Licensed User Longtime User Mar 2, 2013 #2 Did you try this? Code: Copy NumberFormat2(Latitude.Text,2,10,10,False) NumberFormat2(Longitude.Text,2,10,10,False) instead of: Latitude.Text.Trim and Longitude.Text.Trim Upvote 0
Did you try this? Code: Copy NumberFormat2(Latitude.Text,2,10,10,False) NumberFormat2(Longitude.Text,2,10,10,False) instead of: Latitude.Text.Trim and Longitude.Text.Trim
ThePuiu Active Member Licensed User Longtime User Mar 2, 2013 #3 Yes, I tried this: NumberFormat2(Latitudine.Text.Trim,2,10,13,False) but the result is the same ... Upvote 0
M Mahares Expert Licensed User Longtime User Mar 2, 2013 #4 You can try changing the field type in SQLite for the longitude and latitude to TEXT instead of Decimal. SQLite accepts any data type in a TEXT field. It might cure the problem. Basically with SQLite you have 4 data types: INTEGER, BLOB, TEXT, REAL Last edited: Mar 2, 2013 Upvote 0
You can try changing the field type in SQLite for the longitude and latitude to TEXT instead of Decimal. SQLite accepts any data type in a TEXT field. It might cure the problem. Basically with SQLite you have 4 data types: INTEGER, BLOB, TEXT, REAL