RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Enterprise
Expertise: Intermediate
May 21, 2001



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Order By Column Not Row with rs.Getrows

This ASP script will enable you to order your database by columns instead of the default by rows, which is not easy on the eye. Due to the way HTML tables are written in code, you can only return the results in this order.

Here we set the recordset to an array with a 3-column table, ordered by column. This is useful for displaying well ordered, easy-to-view results.
' ##### Create Array Of The Recordset
rcount = rs.RecordCount
Dim myarray()
pos = 0
increment = 0
rcount = cint(rcount)
startpos = 0
balance = 0
pos = 0
dcount = rcount / 3
if rcount mod 3 <> 0 then dcount=int(dcount)+1
ReDim myarray(dcount,3,4)
For i = 1 To rcount
if i<= dcount then
myarray(i,1,1) = rs.FIELDS(2).VALUE
myarray(i,1,2) = rs(
Wayne Johnson
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date