Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detect Event Viewer Keywords null value
Message
From
09/01/2017 03:50:22
 
 
To
08/01/2017 16:47:26
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:
01646405
Views:
37
>When you have something like this:
>
>
>' Cast the EventRecord object as an EventLogRecord object to access the EventLogRecord class properties
>loEventLogRecord = CType(loEventRecord, EventLogRecord)
>
>
>...the following won't work to detect if we have a null value:
>
>
>' If we have the object
>If Not loEventRecord.Keywords Is Nothing Then
>   loInsertRow.ParameterAdd("Keyword", loEventRecord.Keywords)
>End If
>
>
>Anyone would have a recommendation on a workaround?

Don't understand your question. Firstly, you are casting to loEventLogRecord but not using it in subsequent code. And what is the value of loEventRecord and loEventRecord.Keywords when the if statement executes ?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform