Forums

This topic is locked

Microsoft VBScript runtime error '800a005e'

Posted 02 Jan 2003 16:10:50
1
has voted
02 Jan 2003 16:10:50 Jelle-Jacob de Vries posted:
Could someone tell me what is wrong with my code? I keep getting the following error message:

Microsoft VBScript runtime error '800a005e'

Invalid use of Null: 'Replace'

/paragon/products/product_detail.asp, line 187

Here's my code:

<% If rsProducts.Fields.Item("Standard_sizes".Value <> "" Then %>
<tr bordercolor="#CCCCCC" bgcolor="#000000" class="tintf7f7f7"> <td height="25" class="tintf7f7f7">Standard size(s) </td> </tr> <tr bordercolor="#CCCCCC" class="products"> <td height="25" class="products"><%= replace(rsProducts.Fields.Item("Standard_sizes".Value, VbCrLf, "<br>"%> </td> </tr><% End If %>

Replies

Replied 02 Jan 2003 16:23:18
02 Jan 2003 16:23:18 Martha Graham replied:
Check if the replace function is trying to convert an empty value ""

msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vamsgCantUseNull.asp

Martha Graham

Edited by - MarthaGraham on 02 Jan 2003 16:24:51
Replied 03 Jan 2003 13:18:12
03 Jan 2003 13:18:12 Jelle-Jacob de Vries replied:
Bedankt Martha,

The problem is solved with the Microsoft VBScript runtime error '800a005e'

But now I'm running into the following,
The show region code I have used doesn't work in the right way with a memo-field!!! It works fine with a textfield.

If the field in the database is empty, the code works fine, but when the field is not empty the region doesn't appear in the right way, it shows the region but not the dynamic data within the region?? (The field in the database is not empty)

Hope someone can help me!


<% If (rsProducts.Fields.Item("Standard_sizes".Value) <> "" Then %><tr bordercolor="#CCCCCC" bgcolor="#000000" class="tintf7f7f7"><td height="25" class="tintf7f7f7">Standard size(s)</td>
</tr><tr bordercolor="#CCCCCC" bgcolor="#000000" class="products"><td height="25" class="products"><% strStandardSizes = rsProducts.Fields.Item("Standard_sizes".Value
if strStandardSizes <> "" then
response.write replace(strStandardSizes, vbcrlf, "<BR>"
end if %>



Edited by - jellejacob on 03 Jan 2003 13:18:39

Edited by - jellejacob on 03 Jan 2003 13:19:41

Edited by - jellejacob on 03 Jan 2003 13:20:26

Reply to this topic