473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 2188
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sue | last post by:
Anyone have any ideas on why the code below will show up in a browser's sourcecode as an empty table, and is not visible? aspx: <headertemplate> <asp:Table ID="MyTable" runat="server" /> ...
5
by: Jack | last post by:
Hi, I need to build a asp page where it would serve as a data entry record page as well as display page for records saved. This page should also allow editing of records that has been saved. ...
2
by: William Gill | last post by:
I need to display a couple of labels and a checkbox from each entry in my database. Simple enough, but there are several hundred records, and I only want to display 5 or 10 at a time. Can this be...
1
by: Steve Claflin | last post by:
I have a database with a moderate number of records in several tables (the biggest table at the moment is about 800 records). In development it got moved between 2K and XP repeatedly. Several...
0
by: M. David Johnson | last post by:
I cannot get my OleDbDataAdapter to update my database table from my local dataset table. The Knowledge Base doesn't seem to help - see item 10 below. I have a Microsoft Access 2000 database...
4
by: dennis.joseph | last post by:
Hello Everyone, I have scoured through a million messages (ok...thats a bit exaggerated) but I just cannot figure out how to display null values in a query. I have tried Nz, IIF, Count(*) but it...
9
by: Greg | last post by:
Hi, I have a table with "dates", i'd like to display those dates on a calendar. I've put a calendar in a form, linked to my "date" field, and it works, but only showing one "date" per calendar....
7
by: =?Utf-8?B?aWxy?= | last post by:
Hi I have a table in an sql database that contains data that has been encrypted using the DPAPI. What I am trying to achieve is to bind several controls on a vb 2005 windows form to those...
4
by: RB | last post by:
Hi there, I'm pretty new to ASP.NET, and have a "best practice" sort-of question. I'm programming for .NET 2.0, using VB.Net in Visual Studio 2002. Basically, I've got a web-page which is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.