add EMAIL_ATTMT_INDEX column

This commit is contained in:
Jonathan Jenne 2023-10-09 14:54:48 +02:00
parent d493cf1b5f
commit def648aa53

View File

@ -713,7 +713,7 @@ Public Class clsWorkEmail
If oFileLenth > 2 Then If oFileLenth > 2 Then
_Logger.Info(String.Format("Attachment saved to [{0}]", oAttachmentFilePath)) _Logger.Info(String.Format("Attachment saved to [{0}]", oAttachmentFilePath))
'INSERT_HISTORY_FB(CURRENT_MAIL_MESSAGE_ID, oAttachment.SafeFileName) 'INSERT_HISTORY_FB(CURRENT_MAIL_MESSAGE_ID, oAttachment.SafeFileName)
InsertAttachmentHistoryEntry(pCurrentMail, pCurrentMail.MessageId, oAttachment.SafeFileName) InsertAttachmentHistoryEntry(pCurrentMail, pCurrentMail.MessageId, oAttachment.SafeFileName, oAttachmentFileName)
oAttachmentCount += 1 oAttachmentCount += 1
Else Else
_Logger.Warn($"##!! oFileLenth for AttachmentObjects is <2 !!##") _Logger.Warn($"##!! oFileLenth for AttachmentObjects is <2 !!##")
@ -798,7 +798,7 @@ Public Class clsWorkEmail
Return _DB_MSSQL.ExecuteNonQuery(ins) Return _DB_MSSQL.ExecuteNonQuery(ins)
End Function End Function
Private Function InsertAttachmentHistoryEntry(pCurrentMail As MailContainer, pMessageId As String, pFileName As String) As Boolean Private Function InsertAttachmentHistoryEntry(pCurrentMail As MailContainer, pMessageId As String, pFileName As String, pNewFileName As String) As Boolean
If IsNothing(_DB_MSSQL) Then If IsNothing(_DB_MSSQL) Then
_Logger.Info("INSERT_HISTORY_FB: _DB_MSSQL is nothing ") _Logger.Info("INSERT_HISTORY_FB: _DB_MSSQL is nothing ")
Return False Return False
@ -812,7 +812,8 @@ Public Class clsWorkEmail
EMAIL_SUBJECT, EMAIL_SUBJECT,
EMAIL_DATETIME, EMAIL_DATETIME,
EMAIL_BODY, EMAIL_BODY,
EMAIL_ATTMT EMAIL_ATTMT,
EMAIL_ATTMT_INDEX
) VALUES " & ) VALUES " &
$"('{CurrentMailProcessName}'," & $"('{CurrentMailProcessName}'," &
$"'{pMessageId}'," & $"'{pMessageId}'," &
@ -820,7 +821,8 @@ Public Class clsWorkEmail
$"'{pCurrentMail.SubjectOriginal}'," & $"'{pCurrentMail.SubjectOriginal}'," &
$"'{pCurrentMail.Mail.Date}'," & $"'{pCurrentMail.Mail.Date}'," &
$"'{CURRENT_MAIL_BODY_ALL}'," & $"'{CURRENT_MAIL_BODY_ALL}'," &
$"'{pFileName}')" $"'{pFileName}'," &
$"'{pNewFileName}')"
_DB_MSSQL.ExecuteNonQuery(ins) _DB_MSSQL.ExecuteNonQuery(ins)
End If End If