MoMo
07-11-2002, 11:37 AM
Hello,
I'm a bit stumped. Using an access database to read back a buttload of data, but some of the fields are NULL. Here's an example of the code i'm using, followed by the error.
<%
If objRS("Email_Accounts") = Null Then
Response.Write "No Email Accounts for this domain..."
Else
Response.Write Replace(objRS("Email_Accounts"),vbcrlf,"<br>")
End If
%>
Here's the error i'm getting:
Microsoft VBScript runtime (0x800A005E)
Invalid use of Null: 'Replace'
/view_account.asp, line 90
It's obviously hitting my Else statement, but why? The value is Null, I know this. Is my IF statement constructed wrong? Thanks in advance for any help.
I'm a bit stumped. Using an access database to read back a buttload of data, but some of the fields are NULL. Here's an example of the code i'm using, followed by the error.
<%
If objRS("Email_Accounts") = Null Then
Response.Write "No Email Accounts for this domain..."
Else
Response.Write Replace(objRS("Email_Accounts"),vbcrlf,"<br>")
End If
%>
Here's the error i'm getting:
Microsoft VBScript runtime (0x800A005E)
Invalid use of Null: 'Replace'
/view_account.asp, line 90
It's obviously hitting my Else statement, but why? The value is Null, I know this. Is my IF statement constructed wrong? Thanks in advance for any help.