MS ReadOnly auch indexieren, ComboboxHandling

This commit is contained in:
SchreiberM 2021-03-17 13:28:05 +01:00
parent ec20b64500
commit 6a9e573900

View File

@ -660,11 +660,20 @@ Public Class frmValidator
MsgBox("Error in LoadSQLData: " & ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE)
End Try
End Sub
Private Function PreventNulletc(myObject As Object)
Private Function PreventNulletc(myObject As Object, pType As String)
If IsDBNull(myObject) Then
If pType = "String" Then
Return String.Empty
Else
Return 0
End If
ElseIf IsNothing(myObject) Then
If pType = "String" Then
Return String.Empty
Else
Return 0
End If
Else
Return myObject
End If
@ -731,12 +740,9 @@ Public Class frmValidator
End Sub
#Region "CONTROL LIST"
LOGGER.Debug("In add_ComboBox - GUID: " & oControlID)
Dim oCONID
Dim oCONID As Integer
Try
oCONID = PreventNulletc(oControlRow.Item("CONNECTION_ID"))
If oCONID = String.Empty Then
oCONID = 0
End If
oCONID = PreventNulletc(oControlRow.Item("CONNECTION_ID"), "Integer")
Catch ex As Exception
oCONID = 0
End Try
@ -753,7 +759,7 @@ Public Class frmValidator
If oCONID > 0 And oCommandSQL_UBPF <> String.Empty Then
LOGGER.Debug("ConID > 0 And commandsql <> String.Empty")
Try
oSQL = PreventNulletc(oControlRow.Item("SQL_UEBERPRUEFUNG")) 'TBPM_PROFILE_CONTROLSTableAdapter.cmdGetSQL(ControlID)
oSQL = PreventNulletc(oControlRow.Item("SQL_UEBERPRUEFUNG"), "String") 'TBPM_PROFILE_CONTROLSTableAdapter.cmdGetSQL(ControlID)
If clsPatterns.HasOnlySimplePatterns(oSQL) Then
LOGGER.Debug("SQL HasOnlySimplePatterns!")
@ -4265,7 +4271,7 @@ Public Class frmValidator
Dim oOVERWRITE_DATA = oControlRow.Item("OVERWRITE_DATA")
'Nur wenn der Name der Zeile entspricht und der Index READ_ONLY FALSE ist
If oControlRow.Item("CTRL_NAME") = oControl.Name And (oIsReadOnly = False Or oSQLCheckCommand <> "") And oIndexName <> "DD PM-ONLY FOR DISPLAY" Then
If oControlRow.Item("CTRL_NAME") = oControl.Name And oIndexName <> "DD PM-ONLY FOR DISPLAY" Then '(oIsReadOnly = False Or oSQLCheckCommand <> "") And
LOGGER.Debug("Indexierung für Control (" & oControlId & ") '" & oControlName & "' gestartet. Indexname '" & oIndexName & "'")
If oIndexName = "" Then
LOGGER.Info(" >> Indexname is unexpected empty.")