polilop wrote:
I have a recordset which i have to check if it is empty
Be more specific. Do you want to know if the recordset is empty (no
records)? Or do you want to test if a specific field contains data (as
appears to be the case from your attempt below)?
and if its
not then to print it out
something like
<% if Not(emptyStr=rsBoats.Fields.Item("Price_descr").Va lue) Then%>
<TR> <TD colSpan=4><div align="center"></div>
<div align="left"><span class="titl"><span
class="maliNaslovi">Price description</span></span> </div>
</TD>
?? Why do you have all the empty/nested divs and spans?
</TR>
<TR><TD><div align="left"></div></TD>
<TD colSpan=2><div
align="left"><%=(rsBoats.Fields.Item("Price_descr" ).Value)%></div></TD>
<TD> </TD>
</TR>
<% End if%>
But the second one never prints out why?
Huh? What second one?
I think you want to test if the field contains data, correct? Try this (I've
reformatted the html to make it a little more readable, as well as removing
the emptiy divs.):
<%
dim price
price = rsBoats("Price_descr").value
if len(price) = 0 then
price= 0
end if
%>
<TR>
<TD colSpan=4>
<div align="left">
<span class="titl">
<span class="maliNaslovi">
Price description
</span>
</span>
</div>
</TD>
</TR>
<TR>
<TD>
<div align="left"></div>
</TD>
<TD colSpan=2>
<div align="left">
<%=price%>
</div>
</TD>
<TD> </TD>
</TR>
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.