ASP/HTML

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear Sirs
I changed my ASP code :

Do While iRecordsShown < iPageSize And Not objPagingRS.EOF
Response.Write vbTab & "<tr>" & vbCrLf
For I = 0 To objPagingRS.Fields.Count - 1
Response.Write vbTab & vbTab & "<td>"
Response.Write objPagingRS.Fields(I)
Response.Write "</td>" & vbCrLf
Next 'I
Response.Write vbTab & "</tr>" & vbCrLf

INTO:

Do While iRecordsShown < iPageSize And Not objPagingRS.EOF
%>
<tr>
<%
For I = 0 To objPagingRS.Fields.Count - 1
%>
<td><%=objPagingRS.Fields("tradeid")%></td>
<%
Next 'I
%>
<tr>
<%

to be able to get html data.
Can someone explain to me why I see the records now 15 times and how I can
change it so that the page is showing each record only one time?
Thanks
Klaus
 
Because that is what your script told it to do
What you want is to show all records in the DO loop is

<% Do While iRecordsShown < iPageSize And Not objPagingRS.EOF %>
<tr>
<td><%=objPagingRS.("tradeid")%></td>
</tr>
<%
objPagingRS.MoveNext
Loop
%>


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Dear Sirs
| I changed my ASP code :
|
| Do While iRecordsShown < iPageSize And Not objPagingRS.EOF
| Response.Write vbTab & "<tr>" & vbCrLf
| For I = 0 To objPagingRS.Fields.Count - 1
| Response.Write vbTab & vbTab & "<td>"
| Response.Write objPagingRS.Fields(I)
| Response.Write "</td>" & vbCrLf
| Next 'I
| Response.Write vbTab & "</tr>" & vbCrLf
|
| INTO:
|
| Do While iRecordsShown < iPageSize And Not objPagingRS.EOF
| %>
| <tr>
| <%
| For I = 0 To objPagingRS.Fields.Count - 1
| %>
| <td><%=objPagingRS.Fields("tradeid")%></td>
| <%
| Next 'I
| %>
| <tr>
| <%
|
| to be able to get html data.
| Can someone explain to me why I see the records now 15 times and how I can
| change it so that the page is showing each record only one time?
| Thanks
| Klaus
 
Back
Top