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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Records from data don't show up.

Status
Not open for further replies.

oahu9872

Programmer
Aug 12, 2005
9
US
I have set up a loop that pulls records from a database and displays them in a table. My problem is that nothing is showing up. The webpage shows that 651 records were pulled, and even breaks them down by section, but there is no data for individual records shown. Here is my code, maybe I am leaving out something simple. Thanks.

<td colspan="2">
<% While ((Repeat1__numRows <> 0) AND (NOT RsClassResults.EOF)) %>
<table width="500" border="0" cellpadding="0" cellspacing="0" >
<% If RsClassResultsSection <> RsClassResults.Fields.Item("SectionName").Value then %>
<tr>
<td height="5"><img src="images/1x1.gif" width="1" height="5"></td>
</tr>
<tr>
<td height="1" bgcolor="#666666"><img src="images/1x1.gif" width="1" height="1"></td>
</tr>
<tr>
<td height="20" class="maintexthd14"><%=(RsClassResults.Fields.Item("SectionName").Value)%>
</td>
</tr>
<tr>
<td height="1" bgcolor="#666666"><img src="../images/1x1.gif" width="1" height="1"></td>
</tr>
<tr>
<td height="5"><img src="../images/1x1.gif" width="1" height="5"></td>
</tr>
<% RsClassResultsSection = RsClassResults.Fields.Item("SectionName").Value %>
<% end if %>

<tr>
<td class="maintext">
<% if (refered_by = "search" or refered_by = "list") and RsClassResults.Fields.Item("AdType").Value = "W" then %>
<b>Wanted</b><br>
<% end if %>
<%=(RsClassResults.Fields.Item("Adtext").Value)%>
<br>
<br></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
RsClassResults.MoveNext()
Wend
%>
</table>
 
Your <table> should be before your loop
Code:
<td colspan="2">
<table width="500" border="0" cellpadding="0" cellspacing="0" >
   <% While ((Repeat1__numRows <> 0) AND (NOT   RsClassResults.EOF)) %>
I'm assuming the td colspan stuff is for the table within which this table is contained.

When all else fails, have a look at the source generated in explorer (View/Source). That will give you a rough idea of what is happening. You will find that there is a <table> generated for every row but no corresponding </table>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top