Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detect Event Viewer Keywords null value
Message
From
10/01/2017 10:40:16
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows Server 2012
Database:
Visual FoxPro
Application:
Web
Miscellaneous
Thread ID:
01646401
Message ID:
01646461
Views:
20
>So if you inspect the log using the EventViewer what is the Keywords property for an event which comes up with null in code ?
>Did you try running the equivalent of my code ?

In there, Keywords shows Classic. However, in my table, I cannot collect it. I think this is related to the fact the Keywords is recognized as null. So, the code cannot determine the KeywordsDisplayNames property.

Your code is exactly like mine:
' If we need the Keywords
If lKeyword Then
   'loInsertRow.ParameterAdd("Keyword", loEventRecord.Keywords)
End If

' If we need the Keywords display name
If lKeywordDisplayName Then

   ' This one cannot be detected with IF NOT loEventLogRecord.KeywordsDisplayNames IS NOTHING
   Try

      ' 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)
      Catch loException As Exception
   End Try

End If
See attached.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform