Well, i have this annoying problem, every time i call a function to request data from SQlite database, when the request is empty, the App stop working. In iOS works flawless, but in Android don't.
This is the code:
validarLogin: function(e) { var _db=Ti.Database.open('database'); statusLogin=_db.execute('SELECT * FROM Usuario WHERE logged=1'); alert(statusLogin); var status=""; if(statusLogin!=null){ status={ logged:statusLogin.fieldByName('logged'), consultor:statusLogin.fieldByName('idConsultor'), type:statusLogin.fieldByName('type'), }; } _db.close(); return status; },And the error is this:
Uncaught Error: Index -1 requested, with a size of 0.I'm using Titanium Studio: Build: jenkins-titanium-rcp-master-76 (origin/master) Date: 19 December 2013, 15:48:53
Titanium SDK: 3.1.3 GA. Macbook Pro OSX 10.9.
Thanks for your help.