MS
This commit is contained in:
@@ -229,6 +229,34 @@ Public Class ClassDatabase
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function Execute_Scalar_ConID(cmdscalar As String, ConnID As Integer, Optional userInput As Boolean = False)
|
||||
Dim result
|
||||
Try
|
||||
Dim oConnString = Get_ConnectionString(ConnID)
|
||||
LOGGER.Debug($"Execute_Scalar_ConID [{ConnID}]: " & cmdscalar)
|
||||
|
||||
Dim SQLconnect As New SqlClient.SqlConnection
|
||||
Dim SQLcommand As SqlClient.SqlCommand
|
||||
SQLconnect.ConnectionString = oConnString
|
||||
SQLconnect.Open()
|
||||
SQLcommand = SQLconnect.CreateCommand
|
||||
'Update Last Created Record in Foo
|
||||
SQLcommand.CommandText = cmdscalar
|
||||
result = SQLcommand.ExecuteScalar()
|
||||
SQLcommand.Dispose()
|
||||
SQLconnect.Close()
|
||||
Return result
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
If userInput = True Then
|
||||
MsgBox("Error in Execute_Scalar_ConStr - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & cmdscalar, MsgBoxStyle.Critical)
|
||||
End If
|
||||
Clipboard.SetText("Error Execute_Scalar_ConStr: " & ex.Message & vbNewLine & "SQL: " & cmdscalar)
|
||||
LOGGER.Info("Fehler bei Execute_Scalar_ConStr: " & ex.Message, True)
|
||||
LOGGER.Info("#SQL: " & cmdscalar, False)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function OracleExecute_Scalar(cmdscalar As String, OracleConnection As String)
|
||||
Dim result
|
||||
Try
|
||||
|
||||
Reference in New Issue
Block a user