Page 1 of 1

Setting sqlite3_busy_timeout throught ZeosLib

Posted: 12.11.2010, 10:35
by GeorgeBaker
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.

Posted: 17.08.2011, 14:47
by hakaneri
Hello,
I have the same question as George. Is there a way to set busy_timeout for for sqlite via Zeoslib ? If not is there a plan for including this into 7.0 ?

Thanks,
HÃ¥kan

Posted: 22.08.2011, 18:21
by seawolf
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

Posted: 24.08.2011, 13:27
by johank
I just posted a simple fix for this here http://zeos.firmos.at/viewtopic.php?t=2853