diff --git a/Modules.Database/MSSQLServer.vb b/Modules.Database/MSSQLServer.vb index 841968ef..59f22200 100644 --- a/Modules.Database/MSSQLServer.vb +++ b/Modules.Database/MSSQLServer.vb @@ -161,7 +161,8 @@ Public Class MSSQLServer End Using End Using Catch ex As Exception - _Logger.Warn($"GetDatatable failed SQLCommand [{SqlCommand}] - ERROR: {ex.Message}") + _Logger.Error(ex) + _Logger.Warn($"GetDatatable failed SQLCommand [{SqlCommand}]") Return Nothing End Try End Function @@ -196,6 +197,7 @@ Public Class MSSQLServer End Using End Using Catch ex As Exception + _Logger.Error(ex) _Logger.Warn($"GetDatatableWithConnection failed with SQLCommand [{SqlCommand}] and ConnectionString [{MaskConnectionString(ConnectionString)}]") Return Nothing End Try @@ -241,7 +243,8 @@ Public Class MSSQLServer End Using End Using Catch ex As Exception - _Logger.Warn($"GetDatatableWithConnection2 failed SQLCommand [{SqlCommand}] - ERROR: {ex.Message}") + _Logger.Error(ex) + _Logger.Warn($"GetDatatableWithConnection2 failed SQLCommand [{SqlCommand}]") Return Nothing End Try @@ -264,7 +267,8 @@ Public Class MSSQLServer End Using End Using Catch ex As Exception - _Logger.Warn($"ExecuteNonQuery failed SQLCommand [{SQLCommand}] - ERROR: {ex.Message}") + _Logger.Error(ex) + _Logger.Warn($"ExecuteNonQuery failed SQLCommand [{SQLCommand}]") Return False End Try @@ -287,7 +291,8 @@ Public Class MSSQLServer SQLconnect.Close() Return True Catch ex As Exception - _Logger.Warn($"ExecuteNonQueryCS failed SQLCommand [{pSQLCommand}] - ERROR: {ex.Message}") + _Logger.Error(ex) + _Logger.Warn($"ExecuteNonQueryCS failed SQLCommand [{pSQLCommand}]") Return False End Try @@ -320,7 +325,8 @@ Public Class MSSQLServer End Using End Using Catch ex As Exception - _Logger.Warn($"GetScalarValue failed SQLCommand [{SQLCommand}] - ERROR: {ex.Message}") + _Logger.Error(ex) + _Logger.Warn($"GetScalarValue failed SQLCommand [{SQLCommand}]") Return Nothing End Try @@ -353,7 +359,8 @@ Public Class MSSQLServer End Using End Using Catch ex As Exception - _Logger.Warn($"GetScalarValueWithConnection failed SQLCommand [{SQLCommand}] - ERROR: {ex.Message}") + _Logger.Error(ex) + _Logger.Warn($"GetScalarValueWithConnection failed SQLCommand [{SQLCommand}]") Return Nothing End Try End Function @@ -383,7 +390,8 @@ Public Class MSSQLServer Return SQLCommand.Parameters(OutputParameter).Value End Using Catch ex As Exception - _Logger.Warn($"GetScalarValue failed SQLCommand [{SQLCommand}] - ERROR: {ex.Message}") + _Logger.Error(ex) + _Logger.Warn($"GetScalarValue failed SQLCommand [{SQLCommand}]") Return Nothing End Try @@ -407,7 +415,8 @@ Public Class MSSQLServer SQLconnect.Close() Return result Catch ex As Exception - _Logger.Warn($"GetScalarValueConStr failed SQLCommand [{pSQLCommand}] - ERROR: {ex.Message}") + _Logger.Error(ex) + _Logger.Warn($"GetScalarValueConStr failed SQLCommand [{pSQLCommand}]") Return Nothing End Try End Function @@ -440,7 +449,8 @@ Public Class MSSQLServer End Using End Using Catch ex As Exception - _Logger.Warn($"NewExecuteNonQueryAsync failed SQLCommand [{SqlCommand}] - ERROR: {ex.Message}") + _Logger.Error(ex) + _Logger.Warn($"NewExecuteNonQueryAsync failed SQLCommand [{SqlCommand}]") End Try End Sub diff --git a/Modules.Database/My Project/AssemblyInfo.vb b/Modules.Database/My Project/AssemblyInfo.vb index 695166e6..6de0b4b6 100644 --- a/Modules.Database/My Project/AssemblyInfo.vb +++ b/Modules.Database/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + +