Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Enterprise
Expertise: Intermediate
Jul 21, 2000

Prevent Confusion Between IsNULL and IsEmpty in VBScript

When you deal with unknown return values or variant variables whose types might be unknown, you may not know whether the value of the variable is an EMPTY string or a NULL value. In VBScript—where all variables are variants—variables can be one of two special values: EMPTY or NULL. EMPTY is defined as a variable with an un-initialized value, whereas NULL is a variable that contains no valid data.

NULL and EMPTY must be tested for in different manners. For example, with the following syntax, both must be tested before using the variable in question:

 If IsNull(variable)  Or  IsEmpty(variable) Then 
Andrew Holliday
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap