diff --git a/Modules.Database/Adapters/MSSQLServer.vb b/Modules.Database/Adapters/MSSQLServer.vb index 85c89657..468dbb6f 100644 --- a/Modules.Database/Adapters/MSSQLServer.vb +++ b/Modules.Database/Adapters/MSSQLServer.vb @@ -146,7 +146,12 @@ Public Class MSSQLServer End Function Public Function Get_ConnectionStringforID(pConnectionId As Integer) As String - Dim oConnectionString As String = "" + Dim oConnectionString As String = String.Empty + + If pConnectionId = 0 Then + _Logger.Warn("ConnectionId was 0. Falling back to default connection.") + Return String.Empty + End If Try Dim oTable As DataTable = GetDatatable($"SELECT * FROM TBDD_CONNECTION WHERE GUID = {pConnectionId}") @@ -174,17 +179,17 @@ Public Class MSSQLServer End If Case Else - _Logger.Warn("Provider {0} nicht unterstützt!", oProvider) + _Logger.Warn("Provider [{0}] not supported!", oProvider) End Select Else - _Logger.Info("No entry for Connection-ID: " & pConnectionId.ToString) + _Logger.Warn("No entry for Connection-ID: [{0}] ", pConnectionId.ToString) End If Catch ex As Exception _Logger.Error(ex) - _Logger.Info("Error in bei Get_ConnectionStringforID") + _Logger.Warn("Error in Get_ConnectionStringforID") End Try Return DecryptConnectionString(oConnectionString) diff --git a/Modules.Database/My Project/AssemblyInfo.vb b/Modules.Database/My Project/AssemblyInfo.vb index 3dcd7ad7..065bd084 100644 --- a/Modules.Database/My Project/AssemblyInfo.vb +++ b/Modules.Database/My Project/AssemblyInfo.vb @@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices - + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + +