diff --git a/Global_Indexer/ClassControls.vb b/Global_Indexer/ClassControls.vb index 3d98294..2c87449 100644 --- a/Global_Indexer/ClassControls.vb +++ b/Global_Indexer/ClassControls.vb @@ -59,7 +59,7 @@ Public Class ClassControls PrepareDependingControl(sender) End Sub - Public Function AddVorschlag_ComboBox(indexname As String, y As Integer, conid As Integer, sql_Vorschlag As String, Multiselect As Boolean, DataType As String, Optional Vorgabe As String = "", Optional AddNewValues As Boolean = False, Optional PreventDuplicateValues As Boolean = False) As Control + Public Function AddVorschlag_ComboBox(indexname As String, y As Integer, conid As Integer, sql_Vorschlag As String, Multiselect As Boolean, DataType As String, Optional Vorgabe As String = "", Optional AddNewValues As Boolean = False, Optional PreventDuplicateValues As Boolean = False, Optional SQLSuggestion As Boolean = False) As Control Try Dim oSql As String = sql_Vorschlag Dim oConnectionString As String @@ -97,7 +97,7 @@ Public Class ClassControls oConnectionString = ClassFormFunctions.GetConnectionString(conid) - If oConnectionString IsNot Nothing And oSql.Length > 0 Then + If oConnectionString IsNot Nothing And oSql.Length > 0 And SQLSu ggestion = True Then LOGGER.Debug("Connection String (redacted): [{0}]", oConnectionString.Substring(0, 30)) If ClassPatterns.HasComplexPatterns(oSql) Then diff --git a/Global_Indexer/frmIndex.vb b/Global_Indexer/frmIndex.vb index 52e76d7..066e6c0 100644 --- a/Global_Indexer/frmIndex.vb +++ b/Global_Indexer/frmIndex.vb @@ -1620,6 +1620,7 @@ Public Class frmIndex Dim PreventDuplicates As Boolean = oRow.Item("VKT_PREVENT_MULTIPLE_VALUES") Dim oControlName As String = oRow.Item("NAME") Dim oConnectionId = NotNull(oRow.Item("CONNECTION_ID"), 0) + Dim oSQLSuggestion = oRow.Item("SUGGESTION") If oDataType <> "BOOLEAN" Then addLabel(oControlName, oRow.Item("COMMENT").ToString, oLabelPosition, oControlCount) @@ -1636,8 +1637,8 @@ Public Class frmIndex pnlIndex.Controls.Add(chk) End If Case "INTEGER" - If (oRow.Item("SUGGESTION") = True And oRow.Item("SQL_RESULT").ToString.Length > 0) Or MultiSelect = True Then - Dim oControl = oControls.AddVorschlag_ComboBox(oControlName, oControlPosition, oConnectionId, oRow.Item("SQL_RESULT"), MultiSelect, oDataType, DefaultValue, AddNewItems, PreventDuplicates) + If (oSQLSuggestion = True And oRow.Item("SQL_RESULT").ToString.Length > 0) Or MultiSelect = True Then + Dim oControl = oControls.AddVorschlag_ComboBox(oControlName, oControlPosition, oConnectionId, oRow.Item("SQL_RESULT"), MultiSelect, oDataType, DefaultValue, AddNewItems, PreventDuplicates, oSQLSuggestion) If Not IsNothing(oControl) Then pnlIndex.Controls.Add(oControl) End If @@ -1649,8 +1650,8 @@ Public Class frmIndex End If End If Case "VARCHAR" - If (oRow.Item("SUGGESTION") = True And oRow.Item("SQL_RESULT").ToString.Length > 0) Or MultiSelect = True Then - Dim oControl = oControls.AddVorschlag_ComboBox(oControlName, oControlPosition, oConnectionId, oRow.Item("SQL_RESULT"), MultiSelect, oDataType, DefaultValue, AddNewItems, PreventDuplicates) + If (oSQLSuggestion = True And oRow.Item("SQL_RESULT").ToString.Length > 0) Or MultiSelect = True Then + Dim oControl = oControls.AddVorschlag_ComboBox(oControlName, oControlPosition, oConnectionId, oRow.Item("SQL_RESULT"), MultiSelect, oDataType, DefaultValue, AddNewItems, PreventDuplicates, oSQLSuggestion) If Not IsNothing(oControl) Then pnlIndex.Controls.Add(oControl) End If