When working with database or array values, you may have seen this:
Microsoft VBScript runtime error '800a005e' Invalid use of Null: 'Replace' /<file>.asp, line <line>
|
To alleviate this error, instead of this:
<% x = replace(rs("x"), something, somethingElse) %> |
Do this:
<% rsx = rs("x") if len(rsx) > 0 then x = replace(rsx, something, somethingElse) else x = "" end if %> |
For database values, try preventing NULLs from coming out of the database in the first place. See
Article #2073 and
Article #2150 for more information.