From d6c9eb8583bba3db3cddc89f5cd9482734be1bc9 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Fri, 20 Mar 2020 02:21:37 +0700 Subject: [PATCH] changed connection to SQL due to some mistakes --- images/win/scripts/Installers/Validate-SQLExpress.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Validate-SQLExpress.ps1 b/images/win/scripts/Installers/Validate-SQLExpress.ps1 index ddb4ca3fd..75ef91855 100644 --- a/images/win/scripts/Installers/Validate-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Validate-SQLExpress.ps1 @@ -22,10 +22,10 @@ function Test-SqlConnection { $ErrorActionPreference = 'Stop' try { $connectionString = 'Server={0};Integrated Security={1};User ID={2};Password={3}' -f $ServerName,$IntegratedSecurity,$UserName,$Password - Write-Host -Object "Trying to connect to SQL Express instance: $ServerName" + Write-Host $connectionString $sqlConnection = New-Object System.Data.SqlClient.SqlConnection $connectionString $sqlConnection.Open() - Write-Host -Object "Connection to database: {0} was successful. Version of SQL Express is: {1}" -f $sqlConnection.Database,$sqlConnection.ServerVersion + Write-Host -Object "Connection to SQL Express was successful." return $sqlConnection.ServerVersion } catch {