From def648aa5342621fb4047c22f126031ee63ef218 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 9 Oct 2023 14:54:48 +0200 Subject: [PATCH] add EMAIL_ATTMT_INDEX column --- App/EmailProfiler.Common/clsWorkEmail.vb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/App/EmailProfiler.Common/clsWorkEmail.vb b/App/EmailProfiler.Common/clsWorkEmail.vb index 6cb5273..afc20f2 100644 --- a/App/EmailProfiler.Common/clsWorkEmail.vb +++ b/App/EmailProfiler.Common/clsWorkEmail.vb @@ -713,7 +713,7 @@ Public Class clsWorkEmail If oFileLenth > 2 Then _Logger.Info(String.Format("Attachment saved to [{0}]", oAttachmentFilePath)) 'INSERT_HISTORY_FB(CURRENT_MAIL_MESSAGE_ID, oAttachment.SafeFileName) - InsertAttachmentHistoryEntry(pCurrentMail, pCurrentMail.MessageId, oAttachment.SafeFileName) + InsertAttachmentHistoryEntry(pCurrentMail, pCurrentMail.MessageId, oAttachment.SafeFileName, oAttachmentFileName) oAttachmentCount += 1 Else _Logger.Warn($"##!! oFileLenth for AttachmentObjects is <2 !!##") @@ -798,7 +798,7 @@ Public Class clsWorkEmail Return _DB_MSSQL.ExecuteNonQuery(ins) 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 _Logger.Info("INSERT_HISTORY_FB: _DB_MSSQL is nothing ") Return False @@ -812,7 +812,8 @@ Public Class clsWorkEmail EMAIL_SUBJECT, EMAIL_DATETIME, EMAIL_BODY, - EMAIL_ATTMT + EMAIL_ATTMT, + EMAIL_ATTMT_INDEX ) VALUES " & $"('{CurrentMailProcessName}'," & $"'{pMessageId}'," & @@ -820,7 +821,8 @@ Public Class clsWorkEmail $"'{pCurrentMail.SubjectOriginal}'," & $"'{pCurrentMail.Mail.Date}'," & $"'{CURRENT_MAIL_BODY_ALL}'," & - $"'{pFileName}')" + $"'{pFileName}'," & + $"'{pNewFileName}')" _DB_MSSQL.ExecuteNonQuery(ins) End If