jj 25.10.
This commit is contained in:
@@ -19,33 +19,7 @@ Public Class ClassDatabase
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateRecord_New(formId As Integer, Optional UseProxy As Boolean = False)
|
||||
Dim SQLconnect As New SqlClient.SqlConnection
|
||||
|
||||
If UseProxy = True And DD_LIB_Standards.clsDatabase.DB_PROXY_INITIALIZED Then
|
||||
SQLconnect.ConnectionString = ClassProxy.MyPROXYConnectionString
|
||||
Else
|
||||
SQLconnect.ConnectionString = ClassDatabase.connectionString
|
||||
End If
|
||||
|
||||
Using cmd As New SqlCommand("PRPMO_CREATE_RECORD", SQLconnect)
|
||||
|
||||
cmd.CommandType = CommandType.StoredProcedure
|
||||
cmd.Parameters.AddWithValue("@pFORM_ID", formId)
|
||||
cmd.Parameters.AddWithValue("@pADDED_WHO", Environment.UserName)
|
||||
cmd.Parameters.Add("@pRESULT", SqlDbType.Int)
|
||||
cmd.Parameters("@pRESULT").Direction = ParameterDirection.Output
|
||||
|
||||
SQLconnect.Open()
|
||||
cmd.ExecuteNonQuery()
|
||||
SQLconnect.Close()
|
||||
|
||||
Dim GUID As Integer = cmd.Parameters("@pRESULT").Value
|
||||
|
||||
Return GUID
|
||||
End Using
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function GetConnectionString(id As Integer)
|
||||
Dim connectionString As String = ""
|
||||
@@ -116,7 +90,7 @@ Public Class ClassDatabase
|
||||
Return dt
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Return_Datatable: " & ex.Message & vbNewLine & vbNewLine & Select_anweisung, MsgBoxStyle.Critical)
|
||||
ClassHelper.InsertEssential_Log(CURRENT_RECORD_ID, "RECORD-ID", ex.Message & " - SQL: " & Select_anweisung
|
||||
ClassHelper.InsertEssential_Log(CURRENT_RECORD_ID, "RECORD-ID", ex.Message & " - SQL: " & Select_anweisung)
|
||||
ClassLogger.Add("Error in Return_Datatable: " & ex.Message, True)
|
||||
ClassLogger.Add(">> SQL: " & Select_anweisung, False)
|
||||
If (ex.Message.Contains("Ungültiger Objektname") Or ex.Message.Contains("Invalid Object Name")) And DD_LIB_Standards.clsDatabase.DB_PROXY_INITIALIZED Then
|
||||
|
||||
Reference in New Issue
Block a user