[thelist] ASP+SQL+HTML tables: is this the sensible way to qu ery my db and display the data

Rory.Plaire at wahchang.com Rory.Plaire at wahchang.com
Fri Aug 17 20:01:36 CDT 2001


| i still have one question though:
| while building the html table how can i know the amount of 
| rows it will
| have.
| that is, today column 2 might be the biggest column with 35 rows, but
| tomorrow it might be column 3 with 47.
| 

Sure.

The RecordCount property changes to reflect the number of rows shown by the
filter. 

For instance, then, if you have, say, 35 records for day 2, the RecordCount
property would be 35. This assumes, however, that you have disconnected the
Recordset from the Connection or retrieved all records. 

Then, with this in mind, you may have to loop through the Recordset 14
times, seven times to apply the filter and read the RecordCount property,
the next seven times to actually write out the table. This is considered a
double-pass mechanism, and is employed frequently to make back-references in
activities like rendering tables or parsing code.

Another way would be just to write out the td's and not worry about how many
rows it takes up. I can't think of a browser that wouldn't render the table
anyway, only without cells in some of the rows.

Oops. Looks like someone beat me to this post...

Maybe I owe a tip.

<rory disposition="Javascript is fun..." alt="8o"/>




More information about the thelist mailing list