[thelist] Form not posting?
Atkins, Chris
CAtkins at patriothomes.com
Thu Apr 6 18:00:30 2000
Well, I use hungarian notation so I
have this little routine to auto generate portions
of my sql statements. It is necessary to specify
the collection to loop through. In addition I also
sometimes use the querystring to specify "modes".
Anyhow, here's the code I use to generate a
particular select string, cheesy yes, easy? YES! ;)
I will send you the entire page offlist.
for each Item in Request.Form
if InStr(Item,"str") and Item <> "" and
Trim(Request.Form(Item))<>"" then
intCount = intCount + 1
if intCount <> 1 then
strWhere = strWhere & " AND "
end if
strWhere = strWhere & " " & Item & " LIKE '%"&
Trim(Replace(Request.Form(Item),"'","''")) & "%'"
elseif Trim(Request.Form(Item))<> "" and Item <> "blnSearch"
then
intCount = intCount + 1
if intCount <> 1 then
strWhere = strWhere & " AND "
end if
strWhere = strWhere & Item & "=" &
Request.Form(Item)
end if
next
Christopher Atkins
Distributed Applications Technologist