Assuming you have all the rows that you will be presenting (on the page),
you just need to use some very simple arithmetic on the array indexes. For
two columns, divide the row index by two, and in the same iteration of a
loop from 0 to ubound/2, you print the data for both index i and i +
ubound/2, supplying the HTML tags to separate the columns in the table:
iDataRows = UBound(vaGotRows, 2)
iOutputRows = Int(iDataRows/iOutputCols + .999) + 1
For iRow = 0 to iOutputRows - 1
Response.Write "<TR>"
For iCol = 0 to iOutputCols - 1
Response.Write "<TD>" & RecordContents(vaGotRows, iRow +
iCol * iOutputCols) & "</TD>"
Next
Response.Write "</TR>
Next
HTH,
Tore.
-----Original Message-----
From: Pete Lundrigan [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 07, 2002 5:42 PM
To: ActiveServerPages
Subject: Getrows to mutiple columns in vertical order
I once remember reading an article about displaying getrows data in a
table in multiple columns with results being presented newspaper style
(top to bottom). I have search all over and have not located the
article. I would like to create the following:
For example:
Result 1 Result 5
Result 2 Result 6
Result 3 Result 7
Result 4 Result 8
I have been able to create the columns right to left and then wrap.
Does anyone have any tips or sample code to accomplish the above?
TIA
Pete Lundrigan
-----Original Message-----
From: David Parker [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 07, 2002 3:38 PM
To: ActiveServerPages
Subject: Re: ASP search a database
Thanks for your reply Sam,
Actually, I'm ing for some refernce materials that will get me started
in
the right direction with ASP.
I'm working on a school project that requires ASP, nobody on my team
knows
it, so I decided to try and tackle it.
The project requires searching a database and displaying records from
it.
I think this is fairly fundamental. I have a few things from
http://www.aspemporium.com/aspEmporium/index.asp
I was hoping to avoid buying yet another text book.
Thanks,
David
>From: "Sam Thompson" <[EMAIL PROTECTED]>
>Reply-To: "ActiveServerPages" <[EMAIL PROTECTED]>
>To: "ActiveServerPages" <[EMAIL PROTECTED]>
>Subject: Re: ASP search a database
>Date: Mon, 7 Oct 2002 14:44:10 +0100
>
>Are you having trouble searching the database, listing the results or
>display a single record on a page?
>
>Cheers
>Sam Thompson
>
>----- Original Message -----
>From: "David Parker" <[EMAIL PROTECTED]>
>To: "ActiveServerPages" <[EMAIL PROTECTED]>
>Sent: Sunday, October 06, 2002 10:50 PM
>Subject: ASP search a database
>
>
> > Hi, I currently have a basic understanding of the following
> >
> > C++
> > VB
> > JavaScript
> > Java
> > SQL
> > HTML
> >
> > I'm looking into developing in ASP.
> >
> > What I would like to do with ASP and an Access database:
> >
> > Perform a search on a single word (later a phrase)on an access
database.
> >
> > Each "hit" would represent a record in the database.
> >
> > I would like to list each hit on a single page as a hyperlink that
when
> > selected will display that record that the hit refers to in a single
>page.
> >
> > Any suggestion on refernece materials that are very explicit on how
to
>do
> > this.
> >
> > Where's a good jumping off point.
> >
> > Thanks,
> >
> > Daivd
> >
> >
> >
> >
> > _________________________________________________________________
> > MSN Photos is the easiest way to share and print your photos:
> > http://photos.msn.com/support/worldwide.aspx
> >
> >
> > ---
> > You are currently subscribed to activeserverpages as:
>[EMAIL PROTECTED]
> > To unsubscribe send a blank email to
>%%email.unsub%%
> >
>
>
>---
>You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
>To unsubscribe send a blank email to
>%%email.unsub%%
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
---
You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%
---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]