S
shank
I would like to display a recordset using GetRows. The below works, but I
have to believe it's very crude. I googled for a solution and could only
find display that run horizontal. I want to display my results vertically. I
want to predetermine the use of 4 columns and divide the records evenly
across columns. Also, assuming 39 records, how would I get columns 1, 2, 3
to display 10 records and column 4 to display 9 records? Of course, the
number of records may change.
thanks
<%
' Retrieve the total # of rows
iRowNumber = ubound(arrResultSet,2)
%>
<%
varC1Begin = 0
varC1End = Round(iRowNumber/4)
varC2Begin = Round(varC1End) + 1
varC2End = Round(varC1End) * 2
varC3Begin = Round(varC2End) + 1
varC3End = Round(varC1End) * 3
varC4Begin = Round(varC3End) + 1
varC4End = Round(iRowNumber)
%>
<table width="0%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<%
' Loop through the array holding the result set and display the data
For iCounter= varC1Begin to varC1End
Response.Write(arrResultSet(0,iCounter) & "<br>")
Next
%><br>
</td>
<td>
<%
' Loop through the array holding the result set and display the data
For iCounter= varC2Begin to varC2End
Response.Write(arrResultSet(0,iCounter) & "<br>")
Next
%>
</td>
<td>
<%
' Loop through the array holding the result set and display the data
For iCounter= varC3Begin to varC3End
Response.Write(arrResultSet(0,iCounter) & "<br>")
Next
%>
</td>
<td>
<%
' Loop through the array holding the result set and display the data
For iCounter= varC4Begin to varC4End
Response.Write(arrResultSet(0,iCounter) & "<br>")
Next
%>
</td>
</tr>
</table>
have to believe it's very crude. I googled for a solution and could only
find display that run horizontal. I want to display my results vertically. I
want to predetermine the use of 4 columns and divide the records evenly
across columns. Also, assuming 39 records, how would I get columns 1, 2, 3
to display 10 records and column 4 to display 9 records? Of course, the
number of records may change.
thanks
<%
' Retrieve the total # of rows
iRowNumber = ubound(arrResultSet,2)
%>
<%
varC1Begin = 0
varC1End = Round(iRowNumber/4)
varC2Begin = Round(varC1End) + 1
varC2End = Round(varC1End) * 2
varC3Begin = Round(varC2End) + 1
varC3End = Round(varC1End) * 3
varC4Begin = Round(varC3End) + 1
varC4End = Round(iRowNumber)
%>
<table width="0%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<%
' Loop through the array holding the result set and display the data
For iCounter= varC1Begin to varC1End
Response.Write(arrResultSet(0,iCounter) & "<br>")
Next
%><br>
</td>
<td>
<%
' Loop through the array holding the result set and display the data
For iCounter= varC2Begin to varC2End
Response.Write(arrResultSet(0,iCounter) & "<br>")
Next
%>
</td>
<td>
<%
' Loop through the array holding the result set and display the data
For iCounter= varC3Begin to varC3End
Response.Write(arrResultSet(0,iCounter) & "<br>")
Next
%>
</td>
<td>
<%
' Loop through the array holding the result set and display the data
For iCounter= varC4Begin to varC4End
Response.Write(arrResultSet(0,iCounter) & "<br>")
Next
%>
</td>
</tr>
</table>