this is the install code in the app :
works fine:
function sqliteDB() { var db = Ti.Database.install('/Test1.sqlite', 'test1'); var a = db.execute('SELECT title FROM archive'); var counter=0 while (a.isValidRow()) { label1.text+=a.fieldByName('title')+'\n'; counter++; a.next(); } a.close(); db.close(); }
not work :
function sqlDB() { var db = Ti.Database.install('/Test1.sql', 'Test1'); var a = db.execute('SELECT title FROM archive'); var counter=0 while (a.isValidRow()) { label1.text+=a.fieldByName('title')+'\n'; counter++; a.next(); } a.close(); db.close(); }
i always delete the app from device and re-install after any change in the db
using android 2.3 , ti 2.0.3