| |
eak_guy
Posts: 15
Score: 0
Joined: 5/23/2001
From: USA
Status: offline
|
this is from result.asp <form name="form1" method="post" action="jobsearchresults.asp?ln=<% =title1%>,em=<%= loc1%>,cat=<%=categ1%>,dd1=<%=dapo1%>,dd2=<%=dapa%>, dd3=<%=dapb%>,dd4=<%=dapc%>,dd5=<%=dapd%>,dd6=<%=dape%>"> this is from results.aspdim ln,em,cat,dd1,dd2,dd3,dd4,dd5,dd6,ddapo,ddews ddapo="" ddews="" ln=Cstr(Request.Form("jobfield")) em=Cstr(Request.Form("locfield")) cat=Cstr(Request.Form("categfield")) dd1=Cstr(Request.Form("d1")) dd2=Cstr(Request.Form("d2")) dd3=Cstr(Request.Form("d3")) dd4=Cstr(Request.Form("d4")) dd5=Cstr(Request.Form("d5")) dd6=Cstr(Request.Form("d6")) set Rset0 = Server.CreateObject("ADODB.Recordset") Rset0.ActiveConnection = "dsn=xxxx;uid=xx;" dim whereclause whereclause="" if (ln<>"") then whereclause=whereclause + " jtitle LIKE '%"+Cstr(ln)+"%'" end if if(em<>"") then if whereclause="" then whereclause=whereclause + " jlocation LIKE '%"+Cstr(em)+"%'" else whereclause=whereclause + " AND jlocation LIKE '%"+Cstr(em)+"%'" end if end if if(cat<>"") then if whereclause="" then whereclause=whereclause + " jobcategID = '"+Cstr(cat)+"'" else whereclause=whereclause + " AND jobcategID= '"+Cstr(cat)+"'" end if end if if ((dd3<>"errordate") AND (dd4<>"errordate") AND (dd6<>"errordate")) then ddapo=dd5&"/"&dd4&"/"&dd6 if whereclause="" then whereclause=whereclause + " jendate >= '" & ddapo &"'" else whereclause=whereclause + " AND jendate >= '"& ddapo &"'" end if end if if ((dd1<>"errordate") and (dd2<>"errordate") and (dd3<>"errordate")) then ddews=dd2&"/"&dd1&"/"&dd3 if whereclause="" then whereclause=whereclause + " jendate <= '" & ddews & "'" else whereclause=whereclause + " AND jendate <= '"& ddews & "'" end if end if if whereclause="" then Rset0.Source = "SELECT * FROM dbo.JOBOPP" else Rset0.Source = "SELECT * FROM dbo.JOBOPP WHERE" + whereclause end if Rset0.CursorType = 0 Rset0.CursorLocation = 2 Rset0.LockType = 3 Rset0.Open Rset0_numRows = 0 Response.Write(Rset0.Source) if ((Rset0.EOF)AND (Rset0.BOF)) then error="1" else error="0" end if %> PLEASE WHERE is the mistake?
|
|