MS nach Nullverweis frmMAtch

This commit is contained in:
SchreiberM 2020-12-28 11:16:04 +01:00
parent ca03492326
commit 93cc0acfbd
2 changed files with 33 additions and 25 deletions

View File

@ -29,7 +29,7 @@ Public Class ProfileSearches
Try
If _Environment.Service.IsActive = True Then
Try
Dim oSplit() As String = _Environment.Service.Address.Split(":")
Dim oSplit() As String = _Environment.Service.Address.Split(";")
Dim oAppServerAddress As String = oSplit(0)
Dim oAppServerPort As Integer = 9000
If oSplit.Length = 2 Then
@ -38,7 +38,7 @@ Public Class ProfileSearches
_Client = New Client(LogConfig, oAppServerAddress, oAppServerPort)
If Not IsNothing(_Client) Then
If _Client.Connect() Then
_Logger.Debug("ProfileSearches: Appserver connected successfully!")
End If
End If
Catch ex As Exception
@ -59,15 +59,18 @@ Public Class ProfileSearches
Private Function DoLoadDocumentSearches(ProfileId As Integer) As List(Of Search)
Dim oSQL As String = $"SELECT * FROM TBCW_PROF_DOC_SEARCH WHERE ACTIVE = 1 AND PROFILE_ID = {ProfileId} ORDER BY TAB_INDEX"
Dim oSearchesDataTable As DataTable
Dim o = _Environment.Service.Address
If _Environment.Service.IsActive = True Then
Dim oTableResult As TableResult = _Client.GetDatatableByName("TBCW_PROF_DOC_SEARCH", $"PROFILE_ID = {ProfileId}", "TAB_INDEX")
oSearchesDataTable = oTableResult.Table
If oSearchesDataTable Is Nothing Then
_Logger.Warn("TBCW_PROF_DOC_SEARCH from ApPServer is nothing: Failover started...")
oSearchesDataTable = _Environment.Database.GetDatatable(oSQL)
End If
Else
oSearchesDataTable = _Environment.Database.GetDatatable(oSQL)
End If
Dim oDocSearches As New List(Of Search)
If Not IsNothing(oSearchesDataTable) Then
Dim oCounter As Integer = 0
Dim oPatterns As New ClassPatterns(_LogConfig)
@ -101,6 +104,11 @@ Public Class ProfileSearches
oCounter += 1
Next
Else
End If
Return oDocSearches
End Function

View File

@ -41,7 +41,7 @@ Public Class ClassConfig
Public Property ConnectionString As String = String.Empty
<GlobalSetting>
Public Property AppServerConfig As String = "172.24.12.39:9000"
Public Property AppServerConfig As String = String.Empty
' === Logging Configuration
Public Property LogDebug As Boolean = False