This commit is contained in:
Digital Data - Marlon Schreiber 2019-04-09 15:20:08 +02:00
commit 9932541fe2

View File

@ -1015,28 +1015,31 @@ Public Class frmAdministration
Else
value = ClassFinalIndex.GetValue(obj, obj.IndexName, Windream_Indicies, Windream_Indicies_Types, obj.VectorIndex)
End If
value = NotNull(value, String.Empty)
Dim guid = obj.GUID
Dim profileId As Integer = PROFILGUIDTextBox.Text
Dim connectionId As Integer = obj.ConnectionId
Dim sqlCommand As String = obj.SQLCommand.Value.Replace("'", "''")
Dim indexName As String = obj.IndexName
Dim sqlCommand As String = NotNull(obj.SQLCommand.Value, String.Empty).Replace("'", "''")
Dim indexName As String = NotNull(obj.IndexName, String.Empty)
Dim isVectorIndex As Boolean = obj.VectorIndex
Dim addedWho As String = Environment.UserName
Dim description As String = obj.Description
Dim active As Integer = IIf(obj.Active, 1, 0)
If NotNull(indexName, "") = String.Empty Then
If indexName = String.Empty Then
MsgBox("Das Feld IndexName muss ausgefüllt sein!", MsgBoxStyle.Exclamation)
Exit Sub
End If
If NotNull(sqlCommand, "") = String.Empty And NotNull(value, "") = String.Empty Then
If sqlCommand = String.Empty And value = String.Empty Then
MsgBox("Entweder SQLCommand oder StaticValue müssen ausgefüllt sein!", MsgBoxStyle.Exclamation)
Exit Sub
End If
If obj.VectorIndex Then
' Add the vector prefix to the value if index is a vector index
' and value is NOT an SQL-Command
If obj.VectorIndex And value <> "SQL-Command" Then
value = $"{ClassFinalIndex.PREFIX_VECTOR}{value}"
End If