CSafeStr

CSafeStr returns an expression that has been converted to a Variant of subtype String. CSafeStr is similar to CStr except that the expression can be set to Null or Empty. 

Syntax

CSafeStr(expression)

Parameters
expression
Any kind of Variant. The Variant can be of type Null or Empty
Return Value

A Variant of subtype String. If the expression is Null or Empty, an empty string ("") is returned.

Example

<%
    sName = CSafeStr(Record.Fields("Name"))
%>

See Also

VBScript Reference