This commit is contained in:
2021-03-11 10:45:12 +01:00
2 changed files with 21 additions and 11 deletions

View File

@@ -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

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.2.2.0")>
<Assembly: AssemblyFileVersion("1.2.2.0")>
<Assembly: AssemblyVersion("1.2.3.0")>
<Assembly: AssemblyFileVersion("1.2.3.0")>