I'm confused about whether to use the Type Real or Float for columns when creating a SQLite database on a PC to be later used by B4A as read only. I have a column which needs to be held with a sign, up to 3 digits before the decimal point and up to 6 digits after the decimal point. I have the requisite validation in the PC app maintaining this database.
Currently I'm using the Float Type when creating the table (in SQL) containing this column. However, when I use the B4A code lblColumn.Text = Cursor.GetString... to retrieve the column's value & display it in a Label view , it seems to be sometimes taking stored values with 6 used decimal places (after the decimal point) and displaying them rounded to 4 decimal places (after the decimal point). Should I change the Type in the SQL Create verb to Real? I looked at the SQL Table Creation example on page 11 of the User's Guide and it has type FLOAT in the Create verb & REAL in the 'spec' underneath.
Or is the problem due to using GetString rather than GetDouble or even some other reason?
Currently I'm using the Float Type when creating the table (in SQL) containing this column. However, when I use the B4A code lblColumn.Text = Cursor.GetString... to retrieve the column's value & display it in a Label view , it seems to be sometimes taking stored values with 6 used decimal places (after the decimal point) and displaying them rounded to 4 decimal places (after the decimal point). Should I change the Type in the SQL Create verb to Real? I looked at the SQL Table Creation example on page 11 of the User's Guide and it has type FLOAT in the Create verb & REAL in the 'spec' underneath.
Or is the problem due to using GetString rather than GetDouble or even some other reason?