Skip to content
Permalink
Browse files

Set busy timeout for SQLite connections. Closes #947

  • Loading branch information
ansgarbecker committed Mar 24, 2020
1 parent 843e462 commit f114ff47d82daa6c0a40fe7fa470b14783dc5d8f
Showing with 2 additions and 1 deletion.
  1. +1 −1 source/connections.pas
  2. +1 −0 source/dbconnection.pas
@@ -1335,7 +1335,7 @@ procedure Tconnform.ValidateControls;
editSSLCertificate.Enabled := Params.WantSSL;
lblSSLcipher.Enabled := Params.WantSSL;
editSSLcipher.Enabled := Params.WantSSL;
lblQueryTimeout.Enabled := Params.NetTypeGroup in [ngMSSQL, ngPgSQL];
lblQueryTimeout.Enabled := Params.NetTypeGroup in [ngMSSQL, ngPgSQL, ngSQLite];
editQueryTimeout.Enabled := lblQueryTimeout.Enabled;
updownQueryTimeout.Enabled := lblQueryTimeout.Enabled;
chkLocalTimeZone.Enabled := Params.NetTypeGroup = ngMySQL;
@@ -2463,6 +2463,7 @@ procedure TSQLiteConnection.SetActive(Value: Boolean);
FActive := True;
Log(lcInfo, f_('Connected. Thread-ID: %d', [ThreadId]));
FIsUnicode := True;
Query('PRAGMA busy_timeout='+(Parameters.QueryTimeout*1000).ToString);
// Attach additional databases
for i:=1 to FileNames.Count-1 do begin
DbAlias := TPath.GetFileNameWithoutExtension(FileNames[i]);

0 comments on commit f114ff4

Please sign in to comment.
You can’t perform that action at this time.