fix connectionstring not being respected, missing datasource for automatic indexes

This commit is contained in:
Jonathan Jenne 2020-03-17 17:35:00 +01:00
parent 1781a08022
commit a13a3b3c67
4 changed files with 2524 additions and 4391 deletions

View File

@ -86,17 +86,20 @@ Public Class ClassControls
AddHandler oControl.SelectedValuesChanged, AddressOf Lookup_SelectedValuesChanged
oConnectionString = ClassFormFunctions.GetConnectionString(conid)
If oConnectionString IsNot Nothing Then
LOGGER.Debug("Connection String (redacted): [{0}]", oConnectionString.Substring(0, 30))
If ClassPatterns.HasComplexPatterns(oSql) Then
LOGGER.Debug(" >>sql enthält Platzhalter und wird erst während der Laufzeit gefüllt!", False)
Else
Dim oDatatable = ClassDatabase.Return_Datatable_Combined(oSql, oConnectionString, False)
oControl.DataSource = oDatatable
End If
Else
LOGGER.Warn("Connection String for control [{0}] is empty!", oControl.Name)
End If
Return oControl
Catch ex As Exception
LOGGER.Info(" - Unvorhergesehener Unexpected error in AddVorschlag_ComboBox - Indexname: " & indexname & " - Fehler: " & vbNewLine & ex.Message)

View File

@ -65,7 +65,7 @@ Public Class ClassDatabase
Public Shared Function Return_Datatable_Combined(SqlCommand As String, ConnectionString As String, Optional userInput As Boolean = False)
If ConnectionString.Contains("Initial Catalog=") Then
Return Return_Datatable(SqlCommand, userInput)
Return Return_Datatable_CS(SqlCommand, ConnectionString, userInput)
Else
Return Oracle_Return_Datatable(SqlCommand, ConnectionString, userInput)
End If

View File

@ -1766,6 +1766,8 @@ Partial Class frmAdministration
'
Me.ListBoxControl4.AppearanceSelected.BackColor = System.Drawing.Color.Khaki
Me.ListBoxControl4.AppearanceSelected.Options.UseBackColor = True
Me.ListBoxControl4.DataSource = Me.TBDD_INDEX_AUTOMBindingSource
Me.ListBoxControl4.DisplayMember = "INDEXNAME"
resources.ApplyResources(Me.ListBoxControl4, "ListBoxControl4")
Me.ListBoxControl4.Name = "ListBoxControl4"
'

File diff suppressed because it is too large Load Diff