Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6472] Sqlite reading value got converted number to exponential form automatically in Android

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sAppcelerator Studio 4.3.0
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid
Reportershishir.roy
AssigneeAbir Mukherjee
Created2020-01-21T10:20:45.000+0000
Updated2020-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

Comments

  1. shishir.roy 2020-01-23

    Please update on above query

JSON Source