470,648 Members | 1,571 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,648 developers. It's quick & easy.

display records in several TDs per TR?

Could someone point me in the right direction for writing, say, three
records into three table cells and then starting a new row for the next
three records.

(I've used While not EOF and MoveNext for writing each new record to a new
row - hope several records per row isn't too complicated)

Thanks

John


Jul 19 '05 #1
3 2134
On Fri, 28 Nov 2003 00:15:14 +0000 (UTC), "btopenworld"
<jo**@siteweave.net> wrote:
Could someone point me in the right direction for writing, say, three
records into three table cells and then starting a new row for the next
three records.

(I've used While not EOF and MoveNext for writing each new record to a new
row - hope several records per row isn't too complicated)

Thanks

John


Although there are more complex, and more interesting ways of handling
this, but the most straightforward method is...

cnt = 1
response.write "<TABLE>"
response.write "<TR>"
do while not rs.eof
if cnt = 3 then
response.write "</TR><TR>"
cnt = 1
end if
response.write "<TD>"
response.write "Data"
response.write "</TD>"
cnt = cnt + 1
rs.movenext
loop
do while cnt < 3
response.write "<TD>&nbsp;</TD>"
loop
response.write "</TR>"
response.write "</TABLE>"
Jul 19 '05 #2
Dan - thanks a lot - you'll gather I'm a beginner and your info was very
helpful. John
"Dan Brussee" <db******@nc.rr.com> wrote in message
news:12********************************@4ax.com...
On Fri, 28 Nov 2003 00:15:14 +0000 (UTC), "btopenworld"
<jo**@siteweave.net> wrote:
Could someone point me in the right direction for writing, say, three
records into three table cells and then starting a new row for the next
three records.

(I've used While not EOF and MoveNext for writing each new record to a newrow - hope several records per row isn't too complicated)

Thanks

John


Although there are more complex, and more interesting ways of handling
this, but the most straightforward method is...

cnt = 1
response.write "<TABLE>"
response.write "<TR>"
do while not rs.eof
if cnt = 3 then
response.write "</TR><TR>"
cnt = 1
end if
response.write "<TD>"
response.write "Data"
response.write "</TD>"
cnt = cnt + 1
rs.movenext
loop
do while cnt < 3
response.write "<TD>&nbsp;</TD>"
loop
response.write "</TR>"
response.write "</TABLE>"

Jul 19 '05 #3
http://www.aspfaq.com/2247

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"btopenworld" <jo**@siteweave.net> wrote in message
news:bq**********@titan.btinternet.com...
Could someone point me in the right direction for writing, say, three
records into three table cells and then starting a new row for the next
three records.

(I've used While not EOF and MoveNext for writing each new record to a new
row - hope several records per row isn't too complicated)

Thanks

John

Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Sue | last post: by
4 posts views Thread by dennis.joseph | last post: by
7 posts views Thread by =?Utf-8?B?aWxy?= | last post: by
4 posts views Thread by RB | last post: by
1 post views Thread by Korara | last post: by
reply views Thread by warner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.