mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes MSSQL connection string on empty DB
This commit is contained in:
parent
a7ea337f6c
commit
161fbb58bc
1 changed files with 1 additions and 1 deletions
|
|
@ -68,7 +68,7 @@ function Open-IcingaMSSQLConnection()
|
|||
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection;
|
||||
$SqlConnection.ConnectionString = "Server=$Address,$Port;";
|
||||
|
||||
if ($null -ne $SqlDatabase) {
|
||||
if ([string]::IsNullOrEmpty($SqlDatabase) -eq $FALSE) {
|
||||
$SqlConnection.ConnectionString += "Database=$SqlDatabase;";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue