Try to fix situations when the database tab gets repainted with no active connection. Fixes issue #2417.

This commit is contained in:
Ansgar Becker
2011-05-18 05:48:50 +00:00
parent c4f06b692a
commit ca283aee1d

View File

@@ -7868,9 +7868,11 @@ begin
vt := Sender as TVirtualStringTree;
if vt.Tag = VTREE_LOADED then
Exit;
Conn := ActiveConnection;
if Conn = nil then
Exit;
Screen.Cursor := crHourglass;
vt.Clear;
Conn := ActiveConnection;
try
if Conn.InformationSchemaObjects.IndexOf('SCHEMATA') > -1 then
AllDatabasesDetails := Conn.GetResults('SELECT * FROM '+Conn.QuoteIdent(DBNAME_INFORMATION_SCHEMA)+'.'+Conn.QuoteIdent('SCHEMATA'));