Saving Data in sqlite in xojo web app


I created xojo web app in which “sqlite” is used as database. Manually i created tables and added to web app by adding its as copyfile. Connection, inserting data to the table are working fine. Am able to retrieve the data at the same time when i added to table. If we again run the page, the table is empty. Whats the solution? Actually its not saving in the sqlite database.
Please help me

Thank you

If you don’t provide a SQLiteDatabase.DatabaseFile then the SQLite database will reside in memory only.

Hi David Cox,

That i assigned SQLiteDatabase.DatabaseFile=dbfile. Actually the problem is while running the page it create sqlite db file in the debug folder and save the processed data in that file its not taking the file that we have given in as build step->copyfile.

I always create a folder named after my application in

SpecialFolder.ApplicationData.Child(app.applicationName).Child(app.applicationName + '.sqlite")

and populate it if it doesn’t already exist. ApplicationData is best because it works cross-platform and cross-WebApp/Console.

David, I have not a clue as to what, precisely, that line of code does. I’m commenting because I cannot get my web app to directly connect to a SQLite database file that’s in the same folder as my code file is, while testing the app in debug mode – I have no idea as to where the actual app resides when testing a WebApp in debug mode … -_-

Time to read the manual.
There’s a PDF guide in your Xojo install folder if you prefer.

In the folder titled [MyProject].debug that is right next to your project file.