I am working with XOJO and DB SQlite.
So far I connect to the database by
… and then selecting by clicking the last row: “Select SQLite Database”
Works very good. (Windows)
But if I go with the software to a differnt PC I have to copy the DB into a directory, which has the complete identical name (“C:\progname\data\Mydatabase”)
Now I was told, that I can connect the database to the program during compiling, so that it would include it somehow.
But I cannot find any switch, which lets me name the DB-name, to be included???
Where could this be?
You must be referring to a Build Step. Select the menu options Insert -> Build Step -> Copy Files. Drag your database file in and then drag the build step to the appropriate place in Build Settings. This will automatically copy the database file into the folder where your app is. You will have to have your app copy the database file to the correct path before you can open it.
I’ll try this out, I think, thats the thing I was looking for - thanks
But here another question:
Because I am tzesting a lot, I got several copies of the database and all of them are connected to the programm, but only one has got the name, which is used in the code.
FE.: dB1, db2, db3 and only db is used in the code.
And changing is very simple. just rename the db1 into db.
Physically, they all got the same name, but standing on different positions on the harddisk.
So my question: How can I find out, to which physical Db the db1 is connected to? I couldn’t find any place.
Worked in Windows an MAC
Linux seems to be more tricky.
Didn’t work under Ubuntu, will have prbalbly another try with SuseLinux