MS Exceptions GetNextGuid
This commit is contained in:
@@ -1434,24 +1434,34 @@ Public Class frmValidator
|
||||
|
||||
End Function
|
||||
Private Function GetWMDocPathWindows(_CheckStandard As Integer)
|
||||
Dim oResult As String
|
||||
Dim oSQL = $"SELECT [dbo].[FNPM_GET_WM_FILE_PATH] ({CURRENT_DOC_GUID},{_CheckStandard})"
|
||||
oResult = ClassDatabase.Execute_Scalar(oSQL, CONNECTION_STRING)
|
||||
LOGGER.Debug($"Checking file [{oResult}] exists?...")
|
||||
If File.Exists(oResult) = False Then
|
||||
LOGGER.Debug($"GetWMDocPathWindows returned false - trying with standard again...")
|
||||
oSQL = $"SELECT [dbo].[FNPM_GET_WM_FILE_PATH] ({CURRENT_DOC_GUID},1)"
|
||||
Try
|
||||
Dim oResult As String
|
||||
Dim oSQL = $"SELECT [dbo].[FNPM_GET_WM_FILE_PATH] ({CURRENT_DOC_GUID},{_CheckStandard})"
|
||||
oResult = ClassDatabase.Execute_Scalar(oSQL, CONNECTION_STRING)
|
||||
LOGGER.Debug($"Checking file [{oResult}] exists?...")
|
||||
If File.Exists(oResult) = False Then
|
||||
Return False
|
||||
LOGGER.Debug($"GetWMDocPathWindows returned false - trying with standard again...")
|
||||
oSQL = $"SELECT [dbo].[FNPM_GET_WM_FILE_PATH] ({CURRENT_DOC_GUID},1)"
|
||||
oResult = ClassDatabase.Execute_Scalar(oSQL, CONNECTION_STRING)
|
||||
LOGGER.Debug($"Checking file [{oResult}] exists?...")
|
||||
If File.Exists(oResult) = False Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
WMDocPathWindows = oResult
|
||||
OLD_Document_Path = WMDocPathWindows
|
||||
CURRENT_DOC_PATH = WMDocPathWindows
|
||||
LOGGER.Debug($"CURRENT_DOC_PATH: {CURRENT_DOC_PATH}")
|
||||
Return True
|
||||
WMDocPathWindows = oResult
|
||||
OLD_Document_Path = WMDocPathWindows
|
||||
CURRENT_DOC_PATH = WMDocPathWindows
|
||||
LOGGER.Debug($"CURRENT_DOC_PATH: {CURRENT_DOC_PATH}")
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
WMDocPathWindows = ""
|
||||
OLD_Document_Path = ""
|
||||
CURRENT_DOC_PATH = ""
|
||||
errormessage = $"Unexpected error in GetWMDocPathWindows: [{ex.Message}]!"
|
||||
frmError.ShowDialog()
|
||||
Return False
|
||||
End Try
|
||||
|
||||
|
||||
End Function
|
||||
Sub Load_Next_Document(first As Boolean)
|
||||
@@ -1492,10 +1502,14 @@ Public Class frmValidator
|
||||
If CURRENT_JUMP_DOC_GUID = 0 Then
|
||||
CURRENT_DOC_GUID = Get_Next_GUID()
|
||||
End If
|
||||
GetWMDocPathWindows(0)
|
||||
LOGGER.Debug("Dokument-GUID: '" & CURRENT_DOC_GUID.ToString & "'")
|
||||
If CURRENT_DOC_GUID > 0 And CreateWMObject() = True Then
|
||||
|
||||
If CURRENT_DOC_GUID > 0 Then
|
||||
If GetWMDocPathWindows(0) = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
If CreateWMObject() = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
'Beschriftung des Navigators
|
||||
'lblNavigator_anzDok.Text = position & " of " & Anzahl_ValDoks & " files"
|
||||
If WMDocPathWindows <> String.Empty Then
|
||||
|
||||
Reference in New Issue
Block a user