From 05e4c4f3a9fc5e6502979948f4e32fb9d926c91a Mon Sep 17 00:00:00 2001 From: Benjamin Russell Date: Thu, 4 Aug 2016 17:20:52 -0700 Subject: [PATCH] Final changes before V1 testing --- src/Microsoft.SqlTools.ServiceLayer/Program.cs | 5 +++++ src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Query.cs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.SqlTools.ServiceLayer/Program.cs b/src/Microsoft.SqlTools.ServiceLayer/Program.cs index f6054354..c0f547c2 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Program.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Program.cs @@ -2,12 +2,16 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using System.Threading.Tasks; using Microsoft.SqlTools.EditorServices.Utility; using Microsoft.SqlTools.ServiceLayer.Hosting; using Microsoft.SqlTools.ServiceLayer.SqlContext; using Microsoft.SqlTools.ServiceLayer.Workspace; using Microsoft.SqlTools.ServiceLayer.LanguageServices; using Microsoft.SqlTools.ServiceLayer.Connection; +using Microsoft.SqlTools.ServiceLayer.Connection.Contracts; +using Microsoft.SqlTools.ServiceLayer.QueryExecution; +using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts; namespace Microsoft.SqlTools.ServiceLayer { @@ -46,6 +50,7 @@ namespace Microsoft.SqlTools.ServiceLayer AutoCompleteService.Instance.InitializeService(serviceHost); LanguageService.Instance.InitializeService(serviceHost, sqlToolsContext); ConnectionService.Instance.InitializeService(serviceHost); + QueryExecutionService.Instance.InitializeService(serviceHost); serviceHost.Initialize(); serviceHost.WaitForExit(); diff --git a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Query.cs b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Query.cs index e146270f..3e189ece 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Query.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Query.cs @@ -68,7 +68,8 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution } // Create a connection from the connection details - using (DbConnection conn = EditorConnection.Factory.CreateSqlConnection(EditorConnection.ConnectionDetails)) + string connectionString = ConnectionService.BuildConnectionString(EditorConnection.ConnectionDetails); + using (DbConnection conn = EditorConnection.Factory.CreateSqlConnection(connectionString)) { await conn.OpenAsync(cancellationSource.Token);