ASP/HTML

A

Amateur

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
 
S

Stefan B Rusynko

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top