I add WAL mode to a little SQLite.
Var dbFile As FolderItem = SpecialFolder.ApplicationData.Child(“NiP/NiP.db”)
DB = New SQLiteDatabase
DB.DatabaseFile = dbFile
DB.WriteAheadLogging = True
Catch err As DatabaseException
MessageBox ("Errore: " + err.Message)
When open the App (and the database shared in a network folder) i receive on a second Mac the warning “Database is locked”.
I see here that the solution is to enable pooling (
Pooling=True in the connection string).
How to do ?
What happens if you don’t use WAL ?
Appears the same warning … “Database locked”
I’m thinking to open database connection ONLY when need to really access to database (before execute query) and not leave the connection alive from start of the App to the quit.
What do you think ?
And what is the ‘enable pooling’ suggested in the thread pointed?
The locked database warning could be related to the fact i’m accessing the database in a shared network folder (using APF) on Mac Mini Server ?
Have you ever heard of that ‘pooling’ to be enabled (???) described in the thread i’ve linked ?
SQLIte says this usage is NOT recommended