I have built an app which works on my local Win7 PC, which I will eventually deploy to my customer’s MAC OSX laptop.
My question really concerns how to maintain the connection between App and SQLite database.
In the XOJO IDE I have added a Database Class via the Insert>Database>New SQLiteDatabase menu of the IDE. The physical .sqlite file is found in my c:\users\username\documents\appdata\roaming folder. If I build a standalone Windows build, the standalone runs and functions fine. If I deliberately move the .sqlite file to another folder location, then any attempt to start the app will generate a “database not found” error, and the App will close.
What I would like to achieve is a dialog which, in the event of database not found during app startup, which would allow the user to navigate to the physical location of the .sqlite file, perform the connection, and store that path so that next startup will connect without error.
I just can’t figure out how to do this:-
1/ what event should code be in (Application Open??),
2/ how do I check / trap the database not found error?
3/ how do I access / change the path that is stored in the Database Class object
or, is there a better way to approach this matter?
All suggestions gratefully received!