From a51df43aee6c69b85524dfafad80704a648ae4f4 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Tue, 22 Apr 2014 17:14:20 +0000 Subject: [PATCH] Add call to Query() in SetDatabase() after removing it accidentally in previous commit. See http://www.heidisql.com/forum.php?t=15536 --- source/dbconnection.pas | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/dbconnection.pas b/source/dbconnection.pas index b62aab95..bfbbeaf0 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -2586,8 +2586,6 @@ end; Set "Database" property and select that db if connected } procedure TDBConnection.SetDatabase(Value: String); -var - SQL: String; begin Log(lcDebug, 'SetDatabase('+Value+'), FDatabase: '+FDatabase); if Value <> FDatabase then begin @@ -2597,9 +2595,10 @@ begin FOnDatabaseChanged(Self, Value); end else begin if FParameters.NetTypeGroup = ngPgSQL then - SQL := Format(GetSQLSpecifity(spUSEQuery), [EscapeString(Value)]) + Value := EscapeString(Value) else - SQL := Format(GetSQLSpecifity(spUSEQuery), [QuoteIdent(Value)]) + Value := QuoteIdent(Value); + Query(Format(GetSQLSpecifity(spUSEQuery), [Value]), False); end; SetObjectNamesInSelectedDB; end;