[thelist] ASP question: Request.QueryString(variable) alternative needed.
darren
darren at web-bitch.co.uk
Thu Nov 29 11:36:26 CST 2001
On 29 November 2001 at 11:25, April <april at farstrider.org> wrote:
> Annyway. Here's my problem code snippet:
<snip>
how about using getrows to drop your recordset into a 2d array and then
looping through that??
so you would have something like:
if not RSFields.EOF and RSFields.BOF then arrFields = RSFields.getrows
RSFields.close
set RSFields = nothing
then
for intCount = 0 to unbound(arrData, 2)
If Request.QueryString(arrData(cnstFieldID, intCount)) = "yes" Then
If arrData(cnstTier, intCount) = 1 Then
Response.Write "<h3>" & arrData(cnstHeading, intCount) & "</h3>"
Else
Response.Write "<br><h2>" & arrData(cnstHeading, intCount) & "</h2>"
End If
Response.Write arrData(cnstBody, intCount)
end if
next
the cnstFieldID, cnstBody etc are the places that the data is in the
array, which is the same order as they are in the select string.
so if you have:
SELECT FieldID, Heading, Body from <table>
you would have the values
cnstFieldID = 0, cnstHeading = 1, cnstBody = 2
also i've just noticed that your movenext is inside an if..end if, so it
will only be called if Request.QueryString("1") = "yes", you want to move
it out of that if...end if
hth,
darren.
More information about the thelist
mailing list