Setting sqlite3_busy_timeout throught ZeosLib

Forum related to SQLite

Moderators: gto, cipto_kh, EgonHugeist

GeorgeBaker
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 12.11.2010, 10:18

Setting sqlite3_busy_timeout throught ZeosLib

Postby GeorgeBaker » 12.11.2010, 10:35

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.

hakaneri
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 17.08.2011, 14:09

Postby hakaneri » 17.08.2011, 14:47

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

seawolf
Zeos Dev Team *
Zeos Dev Team *
Posts: 385
Joined: 04.06.2008, 19:50
Contact:

Postby seawolf » 22.08.2011, 18:21

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

johank
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 24.08.2011, 13:10

Postby johank » 24.08.2011, 13:27

I just posted a simple fix for this here http://zeos.firmos.at/viewtopic.php?t=2853


Return to “SQLite”

Who is online

Users browsing this forum: No registered users and 1 guest