' Initialization loEventRecord = loEventLogReader.ReadEvent() ' For each record While Not loEventRecord Is Nothing ' Cast the EventRecord object as an EventLogRecord object to access the EventLogRecord class properties loEventLogRecord = CType(loEventRecord, EventLogRecord)Most of the event log record properties are accessed by using loEventRecord. However, when we have a property which contains several items, we have to use it like this:
' Reset the values lcFinal = "" ' For each keyword For Each lcString In loEventLogRecord.KeywordsDisplayNames ' If we have a string If lcFinal.Length > 0 Then lcFinal = lcFinal + ", " End If lcFinal = lcFinal + lcString Next loInsertRow.ParameterAdd("KeywordDisplayName", lcFinal)Properties such as Level, Id, ProviderName, FormatDescription, just to name a few, are accessed directly from loEventRecord. But, properties KeywordDisplayNames and Properties need to be accessed from loEventLogRecord.