Use this logic.
Create connection and recordset objects.
1) open connection
2) contruct select statement as - "select wordcolumnname from tablename order by wordcolumnname"
3) open recordset using the above select statement.
4) Open Table tag, TR tag ad TD tag
5) Declare a counter
6) counter=0
7) Loop through recordset until EOF
If (counter mod 5) = 0 then
Response.write "</td>"
If NOT recordsetobj.EOF then Response.write "<td>"
End If
Response.write recordsetobj("wordcolumnname") & "<BR>"
Counter = counter + 1
recordsetobj.movenext
8) End loop
9) If (counter mod 5) <> 0 then Response.write "</td>"
10)End TR and Table Tags
Hope that helps.
Cheers!
_________________________
- Vijay G
Strive for Perfection
|