[AC-6472] Sqlite reading value got converted number to exponential form automatically in Android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Appcelerator Studio 4.3.0 |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | android |
Reporter | shishir.roy |
Assignee | Abir Mukherjee |
Created | 2020-01-21T10:20:45.000+0000 |
Updated | 2020-01-29T13:04:43.000+0000 |
Description
In Android, while reading a value from SQLite table giving the exponential value.
Below snippets code:
var db = Ti.App.encryptedDB.open('DB');
db.execute('Create table if not exists TestNumber(numb1 real)');
var sql = 'INSERT INTO TestNumber(numb1) values(-26326469)';
db.execute(sql);
var sSQL = "SELECT * FROM TestNumber";
var oData = db.execute(sSQL);
if(oData.isValidRow)
{
var val = oData.fieldByName("numb1");
Ti.API.info("Value :" + val);
}
Actual Output: -2.63265e+07
Expected Output: -26326469
Titanium SDK 8.2.1.GA
<module platform="android" version="3.1.0">appcelerator.encrypteddatabase</module>
Android Device: 7.1.1
Device: Samsung tablet
Android SDK Build: Android 9 API 28
Please update on above query