Beendigung des AddIns bei fehlerhafter Verbindung
This commit is contained in:
@@ -5,6 +5,7 @@ Imports System.Reflection
|
||||
Imports System.Windows.Forms
|
||||
Imports Microsoft.Office.Core
|
||||
Imports System.Dynamic
|
||||
Imports SDL
|
||||
|
||||
'Option Private Module
|
||||
'Imports Microsoft.Office.Core
|
||||
@@ -27,6 +28,7 @@ Public Class ThisAddIn
|
||||
inspectors = Me.Application.Inspectors
|
||||
currentExplorer = Me.Application.ActiveExplorer
|
||||
SharedExplorer = currentExplorer
|
||||
checkConnection()
|
||||
|
||||
AddHandler VERAGRibbon.bla, Sub()
|
||||
' MsgBox("JOAS")
|
||||
@@ -173,6 +175,23 @@ Public Class ThisAddIn
|
||||
' wdDoc.Close(False)
|
||||
' wdApp.Quit()
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub checkConnection()
|
||||
|
||||
|
||||
Dim con = New VERAG_PROG_ALLGEMEIN.SQL
|
||||
|
||||
If con.getValueTxtBySql("SELECT 1", "FMZOLL") <> 1 Then
|
||||
MsgBox("ACHTUNG: Server nicht erreichbar!" & vbCrLf & "VERAG ADD In wird beendet")
|
||||
Application.Quit()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user