SQLite connection drops occasionally
Posted: Tue Oct 08, 2019 7:36 pm
Seems like about every 4-5 hours LC loses the connection to the database and returns an error. (I don't remember the text of the error.) At that point I run the openDatabase handler again and then everything's fine.
Seems like the solution is just to call openDatabase at the top of any handler that's accessing the database. Seems a little clumsy to be constantly refreshing the db connection, but I presume it will work.
Any insight into this problem?
Seems like the solution is just to call openDatabase at the top of any handler that's accessing the database. Seems a little clumsy to be constantly refreshing the db connection, but I presume it will work.
Any insight into this problem?
Code: Select all
local dbID
command openDatabase
put "/full/path/to/theData.data" into tDatabasePath
put revOpenDatabase("sqlite", tDatabasePath, , , , ) into dbID
end openDatabase