Get ready for BLACK FRIDAY shopping starting in

Forums

ASP

This topic is locked

Invalid use of Null: 'Replace'

Posted 22 May 2004 17:28:33
1
has voted
22 May 2004 17:28:33 sean johnson posted:
when i have use this...

<%= Replace(rs("desc_v",chr(13),"<br>"%>

it works perfectly, however, as soon as i put a check around it like this:

<% If len(rs("desc_v") > 0 Then %>
<%= Replace(rs("desc_v",chr(13),"<br>"%>
<% End If %>

i get this error:

Error Type:
Microsoft VBScript runtime (0x800A005E)
Invalid use of Null: 'Replace'

HEEEEELLLP!!!!! <img src=../images/dmxzone/forum/icon_smile_question.gif border=0 align=middle>

BTW - it's inside a repeater row if that makes any difference??

TIA
seanj

Edited by - seanj on 22 May 2004 17:30:09

Replies

Replied 23 May 2004 01:31:47
23 May 2004 01:31:47 Phil Shevlin replied:
try

&lt;% If rs("desc_v" &lt;&gt; "" Then %&gt;
&lt;%= Replace(rs("desc_v",chr(13),"&lt;br&gt;"%&gt;
&lt;% End If %&gt;

Reply to this topic