MS: Chat und co

This commit is contained in:
2020-06-09 16:59:04 +02:00
parent 3d6eb0af14
commit 886c1115ec
36 changed files with 1542 additions and 246 deletions

View File

@@ -184,6 +184,28 @@ Public Class MSSQLServer
Return False
End Try
End Function
Public Function ExecuteNonQueryCS(pSQLCommand As String, ConnString As String, Optional pInfo As String = "")
Try
If pInfo <> "" Then
pInfo = "[" & pInfo & "]"
End If
Dim SQLconnect As New SqlClient.SqlConnection
Dim SQLcommand As SqlClient.SqlCommand
SQLconnect.ConnectionString = ConnString
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
'Update Last Created Record in Foo
SQLcommand.CommandText = pSQLCommand
_Logger.Debug("Execute_non_Query_ConStr Created: " & pSQLCommand)
SQLcommand.ExecuteNonQuery()
SQLcommand.Dispose()
SQLconnect.Close()
Return True
Catch ex As Exception
_Logger.Warn($"Unexpected Error in Execute_non_Query_ConStr{pInfo}: {ex.Message} [{pSQLCommand}]")
Return False
End Try
End Function
Public Function ExecuteNonQuery(SQLCommand As String) As Boolean Implements IDatabase.ExecuteNonQuery
Return ExecuteNonQuery(SQLCommand, _Timeout)
@@ -256,6 +278,29 @@ Public Class MSSQLServer
Return Nothing
End Try
End Function
Public Function GetScalarValueConStr(pSQLCommand As String, ConString As String, Optional pInfo As String = "")
Dim result
Try
If pInfo <> "" Then
pInfo = "[" & pInfo & "]"
End If
Dim SQLconnect As New SqlClient.SqlConnection
Dim SQLcommand As SqlClient.SqlCommand
SQLconnect.ConnectionString = ConString
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
'Update Last Created Record in Foo
SQLcommand.CommandText = pSQLCommand
_Logger.Debug("Execute_Scalar_ConStr Scalar: " & pSQLCommand)
result = SQLcommand.ExecuteScalar()
SQLcommand.Dispose()
SQLconnect.Close()
Return result
Catch ex As Exception
_Logger.Warn($"Unexpected Error in Execute_Scalar_ConStr{pInfo}: {ex.Message} [{pSQLCommand}]")
Return Nothing
End Try
End Function
Public Function GetScalarValue(SQLCommand As SqlCommand, OutputParameter As String) As Object
Return GetScalarValue(SQLCommand, OutputParameter, _Timeout)

View File

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