3326 Kusto HTTPS url fix (#1086)

* 3326 Removed sqlConnection.Open from CreateSqlConnection in ConnectionService.

* 3326 Removed unused variables and functions from ConnectedBindingContext, ConnectedBindingQueue, IBindingContext, and IConnectedBindingQueue

* 3326 Removed unused constant SqlAzureEdition and unused functions CreateSqlConnection and CreateServerConnection from ConnectionService. Removed ServerConnection, MetadataDisplayInfoProvider, Binder, and SmoMetaDataProvider from ConnectedBindingContext. Deleted SqlConnectionOpener and ISqlConnectionOpener.
This commit is contained in:
Justin M
2020-10-05 00:56:40 -07:00
committed by GitHub
parent 164ca951da
commit 2b022d2e48
10 changed files with 15 additions and 461 deletions

View File

@@ -412,19 +412,7 @@ namespace Microsoft.Kusto.ServiceLayer.ObjectExplorer
}
response.Nodes = nodes;
response.ErrorMessage = node.ErrorMessage;
try
{
// SMO changes the database when getting sql objects. Make sure the database is changed back to the original one
if (bindingContext.ServerConnection.CurrentDatabase != bindingContext.ServerConnection.DatabaseName)
{
bindingContext.ServerConnection.SqlConnectionObject.ChangeDatabase(bindingContext.ServerConnection.DatabaseName);
}
}
catch(Exception ex)
{
Logger.Write(TraceEventType.Warning, $"Failed to change the database in OE connection. error: {ex.Message}");
// We should just try to change the connection. If it fails, there's not much we can do
}
return response;
});