diff --git a/app/DD_PM_WINDREAM/frmValidator.vb b/app/DD_PM_WINDREAM/frmValidator.vb index 14ed9d7..c530f8c 100644 --- a/app/DD_PM_WINDREAM/frmValidator.vb +++ b/app/DD_PM_WINDREAM/frmValidator.vb @@ -569,30 +569,42 @@ Public Class frmValidator End Sub Sub LoadSQLData(control As Control, pControlId As Integer) Try - If TypeOf control Is Label Then Exit Sub + If TypeOf control Is Label Then + Exit Sub + End If + LOGGER.Debug($"in LoadSQLData for ControlID [{pControlId}]...") Dim oDTforControl As DataTable = DTCONTROLS_WITH_SQL.Clone() Dim oExpression = $"GUID = {pControlId} AND PROFIL_ID = {CURRENT_ProfilGUID}" DTCONTROLS_WITH_SQL.Select(oExpression).CopyToDataTable(oDTforControl, LoadOption.PreserveChanges) - - If IsNothing(oDTforControl) Then Exit Sub If oDTforControl.Rows.Count = 0 Then Exit Sub For Each row As DataRow In oDTforControl.Rows Dim name As String = row.Item("NAME") Dim oGUID As String = row.Item("GUID") + Dim oReadOnly As Boolean = row.Item("READ_ONLY") + 'If clsPatterns.HasComplexPatterns(row.Item("SQL_UEBERPRUEFUNG")) Then ' LOGGER.Debug($"SQL [{row.Item("SQL_UEBERPRUEFUNG")}] has complex patterns - GUID: {oGUID}") ' Continue For 'End If + + If oReadOnly = True Then + LOGGER.Info("Control for Index [{0}] is read-only. Continuing.") + Continue For + End If + If IsDBNull(row.Item("CONNECTION_ID")) Then LOGGER.Info($"No CONNECTION_ID for SQL-Data - oGUID: {oGUID}") Continue For End If - If IsDBNull(row.Item("SQL_UEBERPRUEFUNG")) Then Continue For + + If IsDBNull(row.Item("SQL_UEBERPRUEFUNG")) Then + Continue For + End If Dim oSQLStatement As String = row.Item("SQL_UEBERPRUEFUNG") Dim oConnectionId As Integer = row.Item("CONNECTION_ID")