TSQLite3Connection and SqliteHandle lazarus / 16-Databases ---------------------------------------------------------------------- swierzbicki · 2013-10-16 19:12 Hello, Is it possible to add such an event to an TSQLiteConnection object (or anything else) like this ? (discussed here http://forum.lazarus.freepascal.org/index.php?topic=9504.0 ) ? procedure TDataCenter.GenericDatasetGetHandle(Dataset: TDataSet); begin   sqlite3_busy_timeout(TSqlite3Dataset(Dataset).SqliteHandle, 1500); end; ---------------------------------------------------------------------- LacaK · 2013-10-17 05:23 It is not required, simply use property Handle of TSQLite3Connection:   sqlite3_busy_timeout(SQLite3Connection1.Handle, 1500); ---------------------------------------------------------------------- swierzbicki · 2013-10-17 07:53 @LacaK : where is declared sqlite3_busy_timeout ? Looks like this method is not part of TSQLite3Connection ! ---------------------------------------------------------------------- Leledumbo · 2013-10-17 14:29 Quotewhere is declared sqlite3_busy_timeout ? Looks like this method is not part of TSQLite3Connection !Form the way it's named and used, I'm 100% sure it's plain sqlite3 function which is of course won't be part of TSQLite3Connection. It should be in sqlite3 unit. ---------------------------------------------------------------------- swierzbicki · 2013-10-17 19:54 @Leledumbo : thanks. My last question : where should I call this ? Before all my applyupdate calls or before my CommitRetaining calls ? ---------------------------------------------------------------------- LacaK · 2013-10-18 05:17 Quote from: swierzbicki on October 17, 2013, 09:53:38 am@LacaK : where is declared sqlite3_busy_timeout ? Looks like this method is not part of TSQLite3Connection ! uses sqlite3dyn You can set timeout just after handle is allocated. i.e. f.e. in AfterConnect event of TSQLite3Connection ---------------------------------------------------------------------- swierzbicki · 2013-10-18 06:15 @LacaK : Sqlite3Connection1.ExecuteDirect('PRAGMA busy_timeout = 1500;') isn't the same as  sqlite3_busy_timeout(SQLite3Connection1.Handle, 1500) ? ---------------------------------------------------------------------- LacaK · 2013-10-18 09:35 Quote from: swierzbicki on October 18, 2013, 08:15:48 am@LacaK : Sqlite3Connection1.ExecuteDirect('PRAGMA busy_timeout = 1500;') isn't the same as  sqlite3_busy_timeout(SQLite3Connection1.Handle, 1500) ? According to http://www.sqlite.org/pragma.html#pragma_busy_timeout Yes is