Click to See Complete Forum and Search --> : ASP Tables
Hutty
Jul 17th, 2000, 08:08 AM
Don't have a clue on how to go about creating this loop using an HTML Table. An example using code would be very helpful. Thanks!
compuGEEK
Jul 17th, 2000, 04:46 PM
A Stored Procedure would probably give you the best performance.
I'm using a webclass, and a Data Environment with a SQL Stored Procedure that reads from several different tables:
.Write "<table rules = none align = top border = 0 cellpadding = 2 cellspacing = 5>"
.Write "<tr>"
.Write "<td nowrap><b><font size = 3>Column Header 1</b></font></td>"
.Write "<td nowrap><b><font size = 3>Column Header 2</b></font></td>"
.Write "<td nowrap align = right><b><font size = 3>Column Header 3</b></font></td>"
.Write "</tr>"
'This opens the connection
DE1.StoredProcedure DE1.rsMyStoredProcedure.Fields("no")
'This writes the table rows and cells until EOF
Do Until DE1.rsMyStoredProcedure.EOF
.Write "<tr valign = baseline>"
.Write "<td nowrap><b><font size = 2>" & DE1.rsMyStoredProcedure.Fields("Field One") & "</b></font></td>"
.Write "<td nowrap><b><font size = 2>" & DE1.rsMyStoredProcedure.Fields("Field Two") & "</b></font></td>"
.Write "<td nowrap align = right><b><font size = 2>" & Format(DE1.rsMyStoredProcedure.Fields("Field Three"), "currency") & "</b></font></td>"
.Write "</tr>"
DE1.rsMyStoredProcedure.MoveNext
Loop
DE1.rsMyStoredProcedure.Close
.Write "</table>"
If you need help beyond this, just drop me an email!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.