From ac8190fa1c73329cd97b0ef6a0e1820de4e141b6 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Tue, 19 Nov 2019 06:45:20 +0100 Subject: [PATCH] Suppress errors in GetLockedTableCount, which is not working on all servers: https://www.heidisql.com/forum.php?t=34984 --- source/dbconnection.pas | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 7bea9a9e8..2339cec43 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -4293,12 +4293,13 @@ function TDBConnection.GetLockedTableCount(db: String): Integer; // Find tables which are currently locked. // Used to prevent waiting time in GetDBObjects. sql := GetSQLSpecifity(spLockedTables); - if sql.IsEmpty then begin - Result := 0; - end else begin + Result := 0; + if not sql.IsEmpty then try LockedTables := GetCol(Format(sql, [QuoteIdent(db,False)])); Result := LockedTables.Count; LockedTables.Free; + except // Suppress errors, due to not working on all servers: https://www.heidisql.com/forum.php?t=34984 + on E:EDbError do; end; end;