Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

IF THEN ELSE

Posted 14 Jul 2002 08:20:19
1
has voted
14 Jul 2002 08:20:19 Barry Williams posted:
<%
Dim replies
replies = rsDetails.Fields.Item("ICQ".Value
if replies = null then
response.write "N/A"
else
response.write replies
end if
%>

Error Type:
Microsoft VBScript compilation (0x800A0411)
Name redefined
/member_view.asp, line 279, column 4
Dim replies


any ideas?

i'm trying to display N/A when a record comes back blank. anyhelp would be great

Replies

Replied 14 Jul 2002 09:08:49
14 Jul 2002 09:08:49 aegis kleais replied:
Try:

<% @LANGUAGE = VBSCRIPT %>
<%
Option Explicit
Dim replies
replies = (rsDetails.Fields.Item("ICQ".Value)
if replies = Null then
response.write ("N/A"
else
response.write (replies)
end if
%>

Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])
Replied 14 Jul 2002 13:57:08
14 Jul 2002 13:57:08 Barry Williams replied:
i tried that but i got the error
Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/member_view.asp, line 263
Option Explicit

so i took the option Explict out so it was like this
<%
Dim replies
replies = (rsDetails.Fields.Item("ICQ".Value)
if replies = Null then
response.write ("N/A"
else
response.write (replies)
end if
%>
but i then got the error
Error Type:
Microsoft VBScript compilation (0x800A0411)
Name redefined
/member_view.asp, line 280, column 4
Dim replies

any more suggestions?
Replied 14 Jul 2002 18:46:23
14 Jul 2002 18:46:23 aegis kleais replied:
Name Redefined usually means that you have 1 or more areas (usually includes) that are defining or redefining a variable, each, causing a conflict.

When you have errors, it's always best to place either entire page code of 20+/- lines of where the error is, in your case, list lines 243-300

Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])

Reply to this topic