MS Amatch Anpassung und DB Log
This commit is contained in:
@@ -63,9 +63,23 @@ Public Class MSSQLServer
|
||||
Try
|
||||
Dim oConnection As New SqlConnection(CurrentSQLConnectionString)
|
||||
oConnection.Open()
|
||||
Dim OMyConnection As New SqlClient.SqlConnection(CurrentSQLConnectionString) 'csb.ConnectionString)
|
||||
Dim csb As New SqlClient.SqlConnectionStringBuilder
|
||||
csb.ConnectionString = CurrentSQLConnectionString
|
||||
Dim constr = OMyConnection.ConnectionString
|
||||
Try
|
||||
constr = constr.Replace(csb.Password, "XXXXX")
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
'If constr.Contains("Trusted_Connection=True") = False Then
|
||||
' constr = constr.Replace(csb.Password, "XXXXX")
|
||||
'End If
|
||||
_Logger.Debug($"Following Connectionstring is open: {constr}")
|
||||
Return oConnection
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
@@ -94,7 +108,7 @@ Public Class MSSQLServer
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
_Logger.Debug("sqlcommand: " & SqlCommand)
|
||||
_Logger.Warn("sqlcommand: " & SqlCommand)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
@@ -130,7 +144,7 @@ Public Class MSSQLServer
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
_Logger.Debug("executeStatement: " & SQLCommand)
|
||||
_Logger.Warn("executeStatement: " & SQLCommand)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -165,6 +179,7 @@ Public Class MSSQLServer
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
_Logger.Warn("SQLQuery: " & SQLQuery)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
@@ -196,7 +211,7 @@ Public Class MSSQLServer
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
_Logger.Debug("executeStatement: " & executeStatement)
|
||||
_Logger.Warn("executeStatement: " & executeStatement)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user