Knowledgebase
Error: Microsoft VBScript runtime error '800a005e' Invalid use of Null: 'Replace'
Posted by DMXReady Admin on 17 March 2004 06:42 PM
Error:
Microsoft VBScript runtime error '800a005e'
Invalid use of Null: 'Replace'
 
Solution:
This error occurs when you have used a Replace function on your page, for instance, to maintain line breaks from a Memo field, and the particular field your recordset has returned is empty (Null).
You can get around this problem by modifying your code slightly to test the field for a value before the replace code runs.
 
For example,
Add this code to each line where you want the memo field to show line breaks:

< %
myVar = (rsName.Fields.Item("MemoColumn").Value)
If myVar <> "" Then
Replace(myVar,chr(13),"br")
End If
%>
  • The variable, myVar, can be named whatever you like.
  • rsName is the name of your recordset.
  • MemoColumn is the name of the column in your database that contains the memo field.
(1093 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Help Desk Software by Kayako dmxready.helpserve.com