Hello, I have a project in B4J with jServer and ABMaterial and right now I am using as a database MariaDB or MySQL. I would like to add SQLite so the users of the web app would not need to have or install a database server.
My web app has a couple websockets that run in different threads. I have seen the tutorial here: https://www.b4x.com/android/forum/threads/webapp-concurrent-access-to-sqlite-databases.39904/ and I will need to use WAL.
So my questions are:
1. Can I initialize more than one SQL object pointing to my database file ? Or do I need to setup a global sql object and use it in all of my project ?
2. Do I need to close the database connection after I finish my queries ? Or will I close just the result set and leave the connection open for later use?
3. KeyValueStore2 uses SQLite and i am using it in my project to keep some settings values, but I saw that I doesn't use WAL ? Do I need to enable it ? I have only one global object as KeyValueStore but I use it also in all of my websockets ...
My web app has a couple websockets that run in different threads. I have seen the tutorial here: https://www.b4x.com/android/forum/threads/webapp-concurrent-access-to-sqlite-databases.39904/ and I will need to use WAL.
So my questions are:
1. Can I initialize more than one SQL object pointing to my database file ? Or do I need to setup a global sql object and use it in all of my project ?
2. Do I need to close the database connection after I finish my queries ? Or will I close just the result set and leave the connection open for later use?
3. KeyValueStore2 uses SQLite and i am using it in my project to keep some settings values, but I saw that I doesn't use WAL ? Do I need to enable it ? I have only one global object as KeyValueStore but I use it also in all of my websockets ...