Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

horizontally aligned tables

Status
Not open for further replies.

cm80

Technical User
May 3, 2001
85
US
Hi,
Is it possible to have the records in a table aligned horizontally rather than vertically?

ie
Fruit Apple Pear
Toy Ball Kite

instead of
Fruit Toy
Apple Ball
Pear Kite

I am using a dynamic array to populate the table.
Thank you
 
I presume i would do that by reading the recordset into an array with GetRows....

You want:
1.1 2.1 3.1
1.2 2.2 3.2
instead of
1.1 1.2
2.1 2.2
3.1 3.2

so you nest 2 next loops...
br
Gerard
 
If you get a chance would you mind giving a quick example of the code please, thanks
 
<%@ Language=VBScript %>
<%
sql = &quot;SELECT Fruit, Toy FROM TTTEST&quot;
Set rs = Server.CreateObject(&quot;ADODB.Recordset&quot;)
rs.ActiveConnection = &quot;DSN=TSNL&quot;
rs.Open sql

Response.Write &quot;Standard:<br>&quot;
do while not rs.EOF
Response.Write rs(0) & &quot; &quot; & rs(1) & &quot;<br>&quot;
rs.MoveNext
loop

rs.movefirst
arrRS = rs.GetRows

Response.Write &quot;<br>Alternative:<br>&quot;
for n = 0 to 1
for m = 0 to 1
response.write arrRS(n,m)
next
Response.Write &quot;<br>&quot;
next

%>

br
Gerard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top