


if not, create it and copy the database file from Resources bundle/directory Check if there is a folder with the App name in special Application Data Also, make sure to add the pDatabase property to the App object in the Navigator: Var source As FolderItem = SpecialFolder.Resource("EddiesElectronics.sqlite")
XOJO TRY NOT WORKING CODE
The Application Support folder is a good place for Desktop apps, while the Documents folder is fine for Web and iOS apps.įor example, if our database file is named “EddiesElectronics.sqlite” and our app name is “Xojotest”, then we can add the following code fragment into the Opening Event Handler of a Desktop app. The best thing to do is to check every time you run the app to see if the database file has already been copied from the app bundle (or folder) into a target folder that doesn’t have an access problem when it is time to use the database. They are many reasons you shouldn’t do that, notably because the database would be open in read/write mode and if you write to that database file inside an application bundle, then you’d be modifying a resource and that would invalidate any certificate signature on your app.

You may think that adding a Build Step is all you need to do, because if the database file is already copied to a well known path then you only need to provide that path as the DatabaseFile property on a new SQLiteDatabase instance. Copying the Database File to a “Working” Folder
