Author Topic: SQLLite database in the build  (Read 1728 times)


  • Guest
SQLLite database in the build
« on: May 24, 2013, 10:12:03 am »
Hi Guys,

Sorry if this has already been asked but I need some help with a build which includes an SQLite database.

My game app includes an SQLite database which I need to ship with the app.
I have tried to put this in various folders including the Asset folder but it cannot read/write from/to it.
I have seen that there is an API called FileOpenAsset which is meant to open the file from the Asset folder and create a copy in the Document folder with a little bit of read and writing but is this applicable to SQLlite databases as the example shows a .txt file?

According to the help for SQLite databases, you put it in the Documents folder for testing and it works perfectly happy but where do you put it when submitting the build?

What I'm after is basically:

a) Which folder do I need to put the database for the build?
b) what extension is valid i.e. db, db3, sql etc?
c) if it has to ship in the Assets folder how do I copy it to the Documents folder without having to create and insert records into it manually as it's likely to contain hundreds, maybe thousands of records.

Your help is much appreciated DragonFireSDK guru's

I've managed to work around the problem for now by checking the database exists, and if not, manually creating the tables and data via SQL statements. This is not ideal as it makes the program huge. I have answered 'b' too as it's happy with the .db3 extension.
Any help is still appreciated peeps.
« Last Edit: May 25, 2013, 09:42:17 am by shamusmca »