>It will convert a null value to a 0 if that occurs but the real fix is to use the try/catch block to ignore log entries which cannot be resolved. There can be several reasons why that can happen. See:
>
https://support.microsoft.com/en-us/kb/166902>I guess the EventReader is a bit flaky when that happens - the EventLogRecord is created but some properties cannot be populated because the data can't be found.
>AFAIKS ignoring these (or handling them differently) is the only solution.
Like I said, Keywords is a different beast.
See this code:
lnKeyword = If(loEventLogRecord.Keywords, 0)
If lKeyword Then
loInsertRow.ParameterAdd("Keyword", lnKeyword)
End If
And, I still end up with a null.
See image attached.
Those are the most recent records.
Before, I had the insert line commented. So, it was placing 0. Now, that I uncommented the line, and added the if() approach, it still places null in the table field.
Basically, the if() cannot detect the null value. It thinks there is something in that loEventLogRecord.Keywords property.