Database is locked error upon calling TZQuery.Refresh

Forum related to SQLite

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 786
Joined: 18.11.2018, 17:37
Location: Hungary

Database is locked error upon calling TZQuery.Refresh

Post 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!
Delphi 12.1, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmariadb.dll 3.3.8
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.13
- MSSQL 2012, 2019; sybdb.dll FreeTDS_2435
- SQLite 3.45.2
Post Reply