Not sure what I am doing wrong… .but, I created a sqllite database with several tables… when I save the project, and later restart XOJO and reload the project, the database is empty… not tables, nothing…
How do you save / reload the database and tables…
Did you Commit after creating the tables?
Did you set DatabaseFile to a valid folderitem before you called CreateDatabase?
I did the creation in the IDE… not in code… I usually use mysql, and it works, but needed to make a lighter version of my software so I was trying to learn to use sqllite.
So, I create the database (insert datbase…), create tables, then ??? what to make it stay?
I would highly recommend not doing it that way. Use some other tool to create your database (there are many sqlite editors available) and open the database in code. The IDE just isn’t a very good or reliable database editor. Not to mention, your app will be less “portable” that way. The IDE stores the absolute path to the database, so if you move your app to another machine, the database must go in exactly the same spot.
thanks TIm… I will find an alternate sqlite generator…
I use SQLite Professional on the App store and find it very useful in creating, editing, importing and exporting SQLite files. There is a free read-only version you may want to try first.
SQLiteManager is very good too… have been using it since 2005