westcoaststyle
Programmer
Hello everyone, I have a rather stupid question for you:
I'm working with an Access DB and I have many fields that do not have data in them. I am using a do until EOF and for loop to display the data according to certain conditions... easy enough.
Well, when my for loop returns no data I want to have it create the table column with a red background, but I can't figure out how to make the ASP see that that data is null or nonexistant.
Here is the code I'm using:
What's odd is that when I change the if statement from x.value="" to x.value<>"" those fields that are null in the db still don't display as red... I'm thinking that Access may hold a null value in a certain way.
Any ideas?
Thanks!
I'm working with an Access DB and I have many fields that do not have data in them. I am using a do until EOF and for loop to display the data according to certain conditions... easy enough.
Well, when my for loop returns no data I want to have it create the table column with a red background, but I can't figure out how to make the ASP see that that data is null or nonexistant.
Here is the code I'm using:
Code:
<%
for each x in hwconfigrs.Fields
if x.name<>"ID" then
if x.value="" then%>
<td align="center" width="20%" bgcolor="#FF0000">NONE</td>
<%else%>
<td align="center" width="20%"><%Response.Write(x.value)%></td>
<%end if
end if
next
%>
What's odd is that when I change the if statement from x.value="" to x.value<>"" those fields that are null in the db still don't display as red... I'm thinking that Access may hold a null value in a certain way.
Any ideas?
Thanks!