Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: loop through querystring values


Message #1 by "Hector" <ektorjr@h...> on Tue, 27 Mar 2001 14:43:29
Hi,

Assuming that you are using asp then the for loop that you would likely use
is something like the following:

Dim X
For Each X In Request.Querystring

	'Check to see if the querystring item is one of the input items which is
	'prefixed with a Q:
			'Make sure the value is not Null:
				If Request.QueryString(X) <> "" Then
					If Mid(X,1,1) = "Q" Then
						'Do something
					End If 'If Mid(X,1,1) = "Q" Then
				Else 'If Request.QueryString(X) <> "" Then
					'Do something
				End If	'If Request.QueryString(X) <> "" Then
Next

Hope that helps,
Christopher Koniges
Database/WEB Systems Programmer
Tel:  (xxx) xxx-xxxx
www.jazzysystems.com

-----Original Message-----
From: Hector [mailto:ektorjr@h...]
Sent: Tuesday, March 27, 2001 2:43 PM
To: sql language
Subject: [sql_language] loop through querystring values


Hi

My users check a number of id values in a form, and then these values are
posted in the string. Then, i want to take all these ID values from the
string, compare them with an Access db field and display the contents of
the matched rows.

I suppose a For-Next loop would be the best for my case but i can't find
the right way to this...

Can anybody help???


  Return to Index