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
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