Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

showing db fields

Status
Not open for further replies.

help120

Technical User
Apr 15, 2001
198
US
I'm trying to call on info from my data base except If the information is blank or = to NA then I want it to display an error message/url. If it's not blank or not = to NA then I want it to display the information in the db.

This is my code so fare..

<%
if trim(rs(&quot;pstarted&quot;)) = &quot;&quot; or IsNull(rs(&quot;pstarted&quot;))then Err_Msg = Err_Msg & &quot;upgrade now&quot;
end if
%>

Now this code works but if the info is some thing other then a blank field thin it shows nothing. Like if I've &quot;1/1/2002&quot; it comes up blank.
 
Depending on how you wanted it displayed you would put it into an else statement.
<%
if trim(rs(&quot;pstarted&quot;)) = &quot;&quot; or IsNull(rs(&quot;pstarted&quot;))then Err_Msg = Err_Msg & &quot;upgrade now&quot;
else
%>
<td>
<%=rs(&quot;pstarted&quot;)%>
</td>
<%
end if
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top