Page 1 of 1

Database is locked error upon calling TZQuery.Refresh

Posted: 01.01.2020, 20:27
by aehimself
I'm currently using the latest available 3.30.1 SQLite.dll to connect to an SQLite database from a multi-threaded 32 bit app via the latest Zeos 7.3 (git) commit. Each thread has it's own connection and one table is explicitly used by one thread at a time. All seems to be fine until I change a filter and then I call .Refresh - at this point an exception is thrown in TZAbstractSQLiteCAPIPreparedStatement.ExecuteQueryPrepared (which is called by InternalRefresh). BusyTimeout does not seem to help and I already serialized all write operations - but a refresh is not a write operation...?

It seems FPlainDriver.sqlite3_step(FStmtHandle); returns with error code 5.

Anyone met this issue before? Any suggestions on how to solve it?

Thanks!