|
 |
asp_web_howto thread: Reading RS into an Array
Message #1 by "Scott Heath" <sheath@e...> on Wed, 4 Sep 2002 09:55:06 -0500
|
|
I'm looking for an easy way to write the results of a record set into an
array easily. I saw it done once in a book but it never worked for me.
Any ideas?
Scott
Website | http://www.scottspad.com
E-mail | scott@s...
Alpha Pager | www.scottspad.com/phone.asp
--------------------------------------------
"I woke up one morning and looked around the room. Something wasn't
right. I realized that someone had broken in the night before and
replaced everything in my apartment with an exact replica. I couldn't
believe it...I got my roommate and showed him. I said, "Look at
this--everything's been replaced with an exact replica!" He said, "Do I
know you?" -Steven Wright
Message #2 by "Alex Shiell, ITS, EB, SE" <alex.shiell@s...> on Wed, 4 Sep 2002 16:06:29 +0100
|
|
if oRS is your recordset, then just do
a = oRS.getRows
and hey presto! you have a 2D array, columns in 1st, rows in 2nd
to iterate through the rows and columns and create a table:
Response.write "<table>"
For i=0 to UBound(a,2)
Response.write "<tr>"
For j=0 to UBound(a,1)
Response.write "<td>"
Response.write a(j,i)
Response.write "</td>"
Next
Response.write "</tr>"
Next
Response.write "</table>"
-----Original Message-----
From: Scott Heath [mailto:sheath@e...]
Sent: 04 September 2002 15:55
To: ASP Web HowTo
Subject: [asp_web_howto] Reading RS into an Array
I'm looking for an easy way to write the results of a record set into an
array easily. I saw it done once in a book but it never worked for me.
Any ideas?
Scott
Website | http://www.scottspad.com
E-mail | scott@s...
Alpha Pager | www.scottspad.com/phone.asp
--------------------------------------------
"I woke up one morning and looked around the room. Something wasn't
right. I realized that someone had broken in the night before and
replaced everything in my apartment with an exact replica. I couldn't
believe it...I got my roommate and showed him. I said, "Look at
this--everything's been replaced with an exact replica!" He said, "Do I
know you?" -Steven Wright
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
________________________________________________________________________
Scottish Enterprise Network
http://www.scottish-enterprise.com
Scottish Enterprise are holding their Annual Public Meeting on Tuesday 3
September 2002.
If you would like to receive an invitation to this meeting or to your local
enterprise company's Annual Public Meeting then
click here www.scottish-enterprise.com/annualpublicmeetings
Headquarters Address & Contact Numbers
150 Broomielaw
5 Atlantic Quay
Glasgow
G2 8LU.
Tel: +44 (0) 141 248 2700.
Fax: +44 (0)141 221 3217
This message is sent in confidence for the addressee only.
It may contain legally privileged information. The contents are not to
be disclosed to anyone other than the addressee. Unauthorised recipients
are requested to preserve this confidentiality and to advise the sender
immediately of any error in transmission.
|
|
 |