ms jobs und interfaces
This commit is contained in:
@@ -420,6 +420,19 @@ Public Class ImportZUGFeRDFiles
|
||||
If oCheckResult.MissingProperties.Count > 0 Then
|
||||
Throw New MissingValueException(oFile)
|
||||
End If
|
||||
Dim oDelSQL = $"DELETE FROM TBEDMI_ITEM_VALUE where REFERENCE_GUID = '{oMessageId}'"
|
||||
Dim oStep As String
|
||||
Try
|
||||
oStep = "Firebird TBEDMI_ITEM_VALUE Delete messageID Items"
|
||||
_firebird.ExecuteNonQueryWithConnection(oDelSQL, oConnection, Firebird.TransactionMode.ExternalTransaction, oTransaction)
|
||||
If oArgs.InsertIntoSQLServer = True Then
|
||||
oStep = "MSSQL TBEDMI_ITEM_VALUE Delete messageID Items"
|
||||
_mssql.ExecuteNonQuery(oDelSQL)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_logger.Warn($"Delete Command [{oDelSQL}] was not successful.")
|
||||
End Try
|
||||
|
||||
|
||||
For Each oProperty In oCheckResult.ValidProperties
|
||||
Dim oGroupCounterValue = oProperty.GroupCounter
|
||||
@@ -431,8 +444,8 @@ Public Class ImportZUGFeRDFiles
|
||||
End If
|
||||
|
||||
Dim oCommand = $"INSERT INTO {oProperty.TableName} (REFERENCE_GUID, ITEM_DESCRIPTION, ITEM_VALUE, GROUP_COUNTER,SPEC_NAME,IS_REQUIRED) VALUES
|
||||
('{oMessageId}', '{oProperty.Description}', '{oProperty.Value}', {oGroupCounterValue},'{oProperty.TableColumn}','{oProperty.ISRequired}')"
|
||||
_logger.Debug("Mapping Property [{0}] with value [{1}], Will be inserted into table [{2}]", oProperty.TableColumn, oProperty.Value, oProperty.TableName)
|
||||
('{oMessageId}', '{oProperty.Description}', '{oProperty.Value.Replace("'", "''")}', {oGroupCounterValue},'{oProperty.TableColumn}','{oProperty.ISRequired}')"
|
||||
_logger.Debug("Mapping Property [{0}] with value [{1}], Will be inserted into table [{2}]", oProperty.TableColumn, oProperty.Value.Replace("'", "''"), oProperty.TableName)
|
||||
' Insert into SQL Server
|
||||
If oArgs.InsertIntoSQLServer = True Then
|
||||
Dim oResult = _mssql.ExecuteNonQuery(oCommand)
|
||||
|
||||
Reference in New Issue
Block a user