I'm using titanium and testing against an android emulator - but any advice relevant to iOs is also welcome!
i am trying to use titanium with a database. I'm using the firefox sql lite plugin to make my db - so i make it, and then i go
database > export database > to a location in my titanium app project that is under "Resources" folder
ok, neat.
Then i have this code:
var db = Ti.Database.install('/db/wibbler.sql','wibbler');
function getLanguages(){
var sql = 'select * from language order by name desc';
var results = [];
var resultSet = db.execute(sql);
while (resultSet.isValidRow()){
results.push({
name: resultSet.fieldByName('name'),
id: resultSet.fieldByName('id'),
desctiption: resultSet.fieldByName('description')
});
reultSet.next();
}
resultSet.close();
return results;
}
As you can see, the location of the file is
Resources/db
and the db file is called "wibbler.sql"
The problem is, when i run my app, it complains that the sql i'm using refers to a table that doesn't exist - to wit:
uncaught error: no such table
What is the deal?