Hello all,
is there a way how I can set sqlite3_busy_timeout (db:busy_timeout, or just busy_timeout) through ZeosLib (or not) in Lazarus? Problem is that my project is using multiple connections to SQLite database file and it sometimes suffer from "Database is locked" exception.
Thanks in advance for help.
Setting sqlite3_busy_timeout throught ZeosLib
Moderators: gto, cipto_kh, EgonHugeist
-
- Fresh Boarder
- Posts: 1
- Joined: 12.11.2010, 10:18
This function is already implement, even though is not simple to use.
Anyway add ZPlainSqliteDriver to the uses units.
An example:
var
FPlainDriver: IZSQLitePlainDriver;
begin
FPlainDriver := ZConnection1.DbcConnection.GetIZPlainDriver as IZSQLitePlainDriver;
FPlainDriver.BusyTimeout(ZConnection1,3000);
...
Hope this can help you
Anyway add ZPlainSqliteDriver to the uses units.
An example:
var
FPlainDriver: IZSQLitePlainDriver;
begin
FPlainDriver := ZConnection1.DbcConnection.GetIZPlainDriver as IZSQLitePlainDriver;
FPlainDriver.BusyTimeout(ZConnection1,3000);
...
Hope this can help you
I just posted a simple fix for this here http://zeos.firmos.at/viewtopic.php?t=2853