Hi,
I use SQLite in a Webapp. I wanna, that several user can use the App at the same time - so I set DB.multiuser = true in my project.
But even when I do an action - the actions of other users are breaking up.
This is how I connect to my DB:
dbFile = GetFolderItem(app.DBPath + “Datenbank.sqlite”) 'VMS
if dbfile.Exists = false then dbfile = GetFolderItem(“Datenbank.sqlite”) 'webserver
Dim DB As New SQLiteDatabase
DB.DatabaseFile = dbFile
If DB.Connect Then
app.Message("Die Datenbank wurde verbunden!", Msg_OK,"")
app.DB = DB
app.DB.MultiUser = True
Else
'MsgBox("Errormessage")
End If
If I select or execute some queries I do use a property called “app.db” as sqlitedatabase
In a web app the MultiUser should be False, since only one instance of your web app is running on the server. MultiUser is necessary when several desktop apps a opening the same SQLite file over a LAN.
then click on the right Button on top “Einstellungen”. If someone else click also on this, the Menu is closing! I do use Containercontrols for this menus!
In addition, make sure you create a separate DB connection for each user session. Also, use transactions, but make sure they are not open for long periods of time.
To the first point, I think Paul means, don’t keep your database in a central location, but create a new one for each session. In other words, move App.DB to Session.DB, and connect anew with each session.
It seems that it’s not the DB - it’s the container controls!
I store the current container in a property - first behind APP, now behind SESSION.
If some click next to the Container or opens another container, It do close the last current container.
So ever, when I open a container on another device, the container on the first device is closing.