Sven Keinath
Sven Keinath

Reputation: 381

Titanium install DB

I have some trouble with installing a database with Ti.Database.install(). Here's what I'm doing:

What I get is

   Runtime Error: LOCATION: [101,19] ti:/invoker.js
   MESSAGE: Uncaught Error: Resources/testimusDB.sqlite SOURCE: return
   delegate.apply(invoker._thisObj_,args);

People with the same problem solved it by reducing the size of the DB (mine is 64 KB) or by using absolute path (I tried absolute-/relative- path and sqlite-/db-/sql- suffix). Any ideas how to solve this problem?

Upvotes: 1

Views: 1008

Answers (2)

Sven Keinath
Sven Keinath

Reputation: 381

Okay I got it: You can't use install() when you're using alloy! (If anybody knows an official source for this information please let me know). You need to use models to sync the database. This guy and this guide helped me a lot.

Thanks for the answers.

Upvotes: 1

daniula
daniula

Reputation: 7028

Close connection to db at the end of operation:

rs.close();
db.close();

Size of the database doesn't matter. I'm using much bigger one: >10MB.

Upvotes: 0

Related Questions