Ms Inactivity, ApplServerConnections

This commit is contained in:
2020-11-19 14:51:00 +01:00
parent 6c289a9a9e
commit 0eeb6ff237
13 changed files with 162 additions and 178 deletions

View File

@@ -49,6 +49,9 @@ Public Class ClassInit
If CONFIG.Config.ConnectionStringAppServer <> String.Empty Then
LOGGER.Debug("ConnectionStringAppServer will be used")
CONNECTION_STRING_APP_SERVER = DecryptConnectionString(CONFIG.Config.ConnectionStringAppServer)
CONNECTION_STRING_READ = CONNECTION_STRING_APP_SERVER
Else
CONNECTION_STRING_READ = CONNECTION_STRING
End If
'VIEWER_UNIVERSAL = CONFIG.Config.UniversalViewerPath
@@ -108,8 +111,16 @@ Public Class ClassInit
frmKonfig.ShowDialog()
dbResult = ClassDatabase.Init()
End If
If CONNECTION_STRING_APP_SERVER <> String.Empty Then
If ClassDatabase.Init(CONNECTION_STRING_APP_SERVER) = False Then
MsgBox("ApplicationServer can not be reached! Check Your configuration.", MsgBoxStyle.Information)
If dbResult = True Then
CONNECTION_STRING_READ = CONNECTION_STRING
End If
End If
End If
If dbResult = False Then
If dbResult = False Then
ERROR_STATE = "FAILED DBCONNECTION"
MsgBox("Error in init database. (Connection failed) More information in the logfile.", MsgBoxStyle.Critical)
Return False