Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detect Event Viewer Keywords null value
Message
De
10/01/2017 10:57:01
 
 
À
10/01/2017 10:40:16
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:
01646462
Vues:
19
>>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.

Hmm. As far as I'm aware 'Classic is the DisplayName for the 0x80000000000000 KeyWords value - which indicates that it is NOT null. Check again in the Event Viewer but look at the Detail/Xml View. You could also look at the Xml in code with loEventLogRecord.ToXml().

When you run the above code what is the Exception ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform