Quantcast
Channel: Adobe Community : Popular Discussions - Archived Discussions
Viewing all articles
Browse latest Browse all 21156

Distributing a pre-populated database - how & other questions

$
0
0
In theStrategies for working with SQL databases in the livedocs it talks about distributing a pre-populated database. I'd like to do this for a couple of reasons, but the main one is to keep all the table create and default data insert statements out of the app itself.

I've created and populated a SQLite database using the command line sqlite3 tool, this is located within my src/ directory of my project, similar tothis example I read (which can be seen in the download). However doing the following:

_dbFile = File.applicationStorageDirectory.resolvePath("test.db");

Open "a" database but it can't be the one I have in my src/ directory as it then complains about missing tables when I try any queries.

I've looked at the compiler options and can't see anywhere to include it, any ideas?

Also what is the strategy employed when doing application upgrades (say I add a table or column in future, but don't want to lose the users existing data), I don't expect anyone to write a massive answer - links to read would be good though.

Thanks,

-D

Viewing all articles
Browse latest Browse all 21156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>