Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detect Event Viewer Keywords null value
Message
De
10/01/2017 10:40:16
 
 
À
10/01/2017 10:25:45
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows Server 2012
Database:
Visual FoxPro
Application:
Web
Divers
Thread ID:
01646401
Message ID:
01646461
Vues:
21
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform