Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
1 rating:
 1 out of 5     Rate this Document

"Invalid Use of Null" Error When Checking if chd(x.y) Returns a NOVALUE in a VBScript

Primary Software: DIAdem
Primary Software Version: 9.0
Primary Software Fixed Version: N/A
Secondary Software:

Problem:
I want to check if a value in my channel is a NOVALUE. But when I use the code similar to the code below in a VBScript, I get an error that says "Invalid Use of Null":

if (chd(1,5)=NOVALUE)...

OR

if (chdx(1,5)=NOVALUE)...


How do I get around this?

Solution:
A value of NOVALUE in DIAdem is converted to NULL in a VBScript. So, you will need to use the IsNull() method, like this:

if (IsNull(chd(1,5)))...

NOTE: In DIAdem 8.1, chdx(1,5) will return 9.9E+34 (the actual value of NOVALUE). Therefore, IsNull(chdx(1,5)) will return FALSE.

Related Links: KnowledgeBase 2RP8343N: What is the Difference Between the ChD and ChDx Functions in DIAdem?

Attachments:





Report Date: 03/16/2004
Last Updated: 03/16/2004
Document ID: 37FEPB3J

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit