[thelist] ASP question: Request.QueryString(variable) alternative needed.

April april at farstrider.org
Thu Nov 29 10:26:52 CST 2001


Currently, I am using Access as the database and PWS as the web 
server.  Yes, I know that both are much less than ideal, but my company was 
bought by a larger parent company, and we are too great of a security risk 
to be allowed access to the software or to the webservers.  And not 
profitable enough to have access to the development team.  But we're under 
the chopping block if we don't improve profits, which in this case means 
offering a web-based profits.  So, I need to learn more than my meager ASP 
samples then write this application on PWS and Access, then port everything 
once the big head guy says he likes it, to what they want it done in.  I 
HATE CORPORATE PROCEDURE!!!!  argh.

Annyway.  Here's my problem code snippet:

While Not RSFields.EOF
	FieldID = RSFields("FieldID")
	If Request.QueryString("" & FieldID & "") = "yes" Then
		If RSFields("Tier") = 1 Then
			Response.Write "<h3>" & RSFields("Heading") & "</h3>"
		Else
			Response.Write "<br><h2>" & RSFields("Heading") & "</h2>"		
		End If
		Response.Write RSFields("Body")
		RSFields.MoveNext
	End If
Wend

I think it works, and does what I want, but goes extremely extremely 
slowly.  Or, it might not be working at all. It's only printing one field 
before the script times out.  If I hard code the FieldID variable, ala:

While Not RSFields.EOF
	FieldID = RSFields("FieldID")
	If Request.QueryString("1") = "yes" Then
		If RSFields("Tier") = 1 Then
			Response.Write "<h3>" & RSFields("Heading") & "</h3>"
		Else
			Response.Write "<br><h2>" & RSFields("Heading") & "</h2>"		
		End If
		Response.Write RSFields("Body")
		RSFields.MoveNext
	End If
Wend

Then it seems to work fine.  Could anyone suggest a way to achieve the same 
effect, in a way that works or circumvents the QueryString(variable) 
problem?  Or, tell me what I'm doing wrong to it?

Thanks,
April
april at farstrider.org




More information about the thelist mailing list