MS ColumnIndex NI via SQL

This commit is contained in:
SchreiberM 2023-04-04 14:00:15 +02:00
parent 1e9910502a
commit ab99d5bb6a
2 changed files with 16 additions and 1 deletions

View File

@ -479,9 +479,24 @@ Public Class frmNIHauptseite
bwProfil.ReportProgress(oDTResults.Rows.Count) bwProfil.ReportProgress(oDTResults.Rows.Count)
_Logger.Debug($">> Working on [{oDTResults.Rows.Count}] documents via SQL...") _Logger.Debug($">> Working on [{oDTResults.Rows.Count}] documents via SQL...")
If Not IsNothing(_windreamNI) Then If Not IsNothing(_windreamNI) Then
Dim i As Integer = 0 Dim i As Integer = 0
For Each oROW As DataRow In oDTResults.Rows For Each oROW As DataRow In oDTResults.Rows
Dim oFilenameWM = oROW.Item(1).ToString Dim oColumnIndex As Integer
Try
Dim oCheckInt As Integer
Dim oCheckStr As String
If Integer.TryParse(oROW.Item(1), oCheckInt) Then
' childAge successfully parsed as Integer
oColumnIndex = 0
Else
oColumnIndex = 1
End If
Catch ex As Exception
End Try
Dim oFilenameWM = oROW.Item(oColumnIndex).ToString
oFilenameWM = oFilenameWM.Replace("W:", "") oFilenameWM = oFilenameWM.Replace("W:", "")
oFilenameWM = oFilenameWM.Replace("\\windream\objects", "") oFilenameWM = oFilenameWM.Replace("\\windream\objects", "")
_Logger.Debug($">> Trying to create WMObject by path [{oFilenameWM}] ...") _Logger.Debug($">> Trying to create WMObject by path [{oFilenameWM}] ...")