DwZone Forum DwZone Forum
Welcome to the DwZone-it Forum
 
  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  
    RegisterRegister -->   LoginLogin  
Advanced Search  
DwZone Forum Index -> Advanced Search

Moderators: AdministratorsModerators 
Hint: For improved responsiveness, use Internet Explorer 4 (or above) with Javascript enabled, choose 'Dynamic' from the View dropdown and hit 'Set Options' to save your changes.
New Topic Search for
 View     Per page     Messages Since 
Messages 151 to 160 of 282 (Total: 122) First |  Prev |  Next |  Last  
 Subject Author Date  
   Re:Two fields with the same name problem  
View this persons public profile  [email protected]   11:32 26 May 2007  
   Re:Two fields with the same name problem  
View this persons public profile  gianluigi   1:14 27 May 2007  
   using with a Recordset that already has a WHERE cl  
View this persons public profile  [email protected]   5:03 2 Apr 2007  
   Re:using with a Recordset that already has a WHERE cl  
View this persons public profile  gianluigi   10:43 2 Apr 2007  
   Re:using with a Recordset that already has a WHERE cl  
View this persons public profile  [email protected]   1:15 3 Apr 2007  
   Recordset keeps disopearing!  
View this persons public profile  [email protected]   1:48 28 Mar 2007  
   Re:Recordset keeps disopearing!  
View this persons public profile  gianluigi   10:17 28 Mar 2007  
    Re:Recordset keeps disopearing!  
View this persons public profile  [email protected]   2:49 2 Apr 2007  
 
Here is the code. The keyword search returns all the results no matter what you type and the Drop downs return nothing!

Thanks in advance

Paul

<%@LANGUAGE="VBSCRIPT" CODEPAGE="28592"%>
<!--#include file="dwzSearch/dwzSearch.asp" -->
<!--#include file="Connections/lassCONN.asp" -->
<%
Dim rsSearch
Dim rsSearch_cmd
Dim rsSearch_numRows

Set rsSearch_cmd = Server.CreateObject ("ADODB.Command")
rsSearch_cmd.ActiveConnection = MM_lassCONN_STRING
rsSearch_cmd.CommandText = "SELECT TBLmain.UID, TBLmain.dayACT, TBLmain.titleACT, TBLmain.timesACT, TBLmain.mon, TBLmain.tues, TBLmain.wed, TBLmain.thu, TBLmain.fri, TBLmain.sat, TBLmain.sun, TBLmain.genderACT, TBLmain.contactACT, TBLmain.contactDetailsACT, TBLmain.costACT, TBLmain.weblinkACT, TBLmain.venueACT, TBLmain.fileACT, TBLmain.notesACT, TBLmain.townACT, TBLmain.lifeestyleACT, TBLmain.ageACT FROM TBLmain ORDER BY titleACT ASC"
rsSearch_cmd.Prepared = true

Set rsSearch = rsSearch_cmd.Execute
rsSearch_numRows = 0
%>
<%
'**************************
' Advanced Search
' http://www.DwZone-it.com
' Version: 2.0.2
'**************************
dim dwzSearch_1
set dwzSearch_1 = new dwzSearch
dwzSearch_1.Init
dwzSearch_1.SetFormName "form1"
dwzSearch_1.SetSubmitName "Submit"
dwzSearch_1.SetBooleanValue "True / False"
dwzSearch_1.SetJollyChar "%_@@_None"
dwzSearch_1.AddFilter "townACT", "All", "", "Town", "", "S", "0"
dwzSearch_1.AddFilter "lifeestyleACT", "All", "", "Activity", "", "S", "0"
dwzSearch_1.AddFilter "dayACT", "All", "", "Day", "", "S", "0"
dwzSearch_1.AddFilter "ageACT", "All", "", "Age", "", "S", "0"
dwzSearch_1.AddFilter "titleACT", "All", "", "keyword", "", "S", "0"
dwzSearch_1.SetStrSQL rsSearch.source
dwzSearch_1.Create()
if dwzSearch_1.HasFilter() then
dwzSearch_1.FilterRecordset rsSearch
end if
'**************************
' Advanced Search
' End code
'**************************
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
rsSearch_numRows = rsSearch_numRows + Repeat1__numRows
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

Dim rsSearch_total
Dim rsSearch_first
Dim rsSearch_last

' set the record count
rsSearch_total = rsSearch.RecordCount

' set the number of rows displayed on this page
If (rsSearch_numRows < 0) Then
rsSearch_numRows = rsSearch_total
Elseif (rsSearch_numRows = 0) Then
rsSearch_numRows = 1
End If

' set the first and last displayed record
rsSearch_first = 1
rsSearch_last = rsSearch_first + rsSearch_numRows - 1

' if we have the correct record count, check the other stats
If (rsSearch_total <> -1) Then
If (rsSearch_first > rsSearch_total) Then
rsSearch_first = rsSearch_total
End If
If (rsSearch_last > rsSearch_total) Then
rsSearch_last = rsSearch_total
End If
If (rsSearch_numRows > rsSearch_total) Then
rsSearch_numRows = rsSearch_total
End If
End If
%>

<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (rsSearch_total = -1) Then

' count the total records by iterating through the recordset
rsSearch_total=0
While (Not rsSearch.EOF)
rsSearch_total = rsSearch_total + 1
rsSearch.MoveNext
Wend

' reset the cursor to the beginning
If (rsSearch.CursorType > 0) Then
rsSearch.MoveFirst
Else
rsSearch.Requery
End If

' set the number of rows displayed on this page
If (rsSearch_numRows < 0 Or rsSearch_numRows > rsSearch_total) Then
rsSearch_numRows = rsSearch_total
End If

' set the first and last displayed record
rsSearch_first = 1
rsSearch_last = rsSearch_first + rsSearch_numRows - 1

If (rsSearch_first > rsSearch_total) Then
rsSearch_first = rsSearch_total
End If
If (rsSearch_last > rsSearch_total) Then
rsSearch_last = rsSearch_total
End If

End If
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<title>Untitled Document</title>
<link href="css/lass.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
<table width="350" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td><font face="Arial, Helvetica, sans-serif">Town</font></td>
<td><p><font face="Arial, Helvetica, sans-serif">

</font><font face="Arial, Helvetica, sans-serif">
<select name="Town" id="Town" value="<%=request("townACT")%>">
<option>All</option>
<option value="gala">Galashiels</option>
<option value="dun">Duns</option>
<option value="ear">Earlston</option>
<option value="kelso">Kelso</option>
</select>
</font></p> </td>
<td width="126"><font face="Arial, Helvetica, sans-serif">Health Topic </font></td>
<td width="126"><p><font face="Arial, Helvetica, sans-serif">

</font><font face="Arial, Helvetica, sans-serif">
<select name="Activity" id="Activity" value="<%=request("lifestyleACT")%>">
<option>All</option>
<option value="heal">Healthier Eating</option>
<option value="phy">Physical Activity</option>
<option value="tob">Tobacco/Smoking</option>
<option value="alc">Alcohol</option>
<option value="mental">Mental health/Wellbeing</option>
<option value="soc">Social Clubs/Activities</option>
</select>
</font></p> </td>
<td width="126" rowspan="3">
<font face="Arial, Helvetica, sans-serif"><br />
</font></td>
</tr>

<tr>
<td><font face="Arial, Helvetica, sans-serif">Day</font></td>
<td><p><font face="Arial, Helvetica, sans-serif">
<select name="Day" id="Day" value="<%=request("dayACT")%>">
<option>All</option>
<option value="mon">
Monday </option>
<option value="tue">Tuesday</option>
<option value="wed">Wednesday</option>
<option value="thu">Thursday</option>
<option value="fri">Friday</option>
<option value="sat">Saturday</option>
<option value="sun">Sunday</option>
</select>
</font></p> </td>
<td width="126"><font face="Arial, Helvetica, sans-serif">Age</font></td>
<td width="126"><p><font face="Arial, Helvetica, sans-serif">

</font><font face="Arial, Helvetica, sans-serif">
<select name="Age" id="Age" value="<%=request("ageACT")%>">
<option>All Adults</option>
<option value="16">Adults 16-49</option>
<option value="50">Adults 50+*</option>
</select>
</font></p> </td>
</tr>
<tr>
<td><font face="Arial, Helvetica, sans-serif">Keyword</font></td>
<td><font face="Arial, Helvetica, sans-serif">
<input name="keyword" type="text" id="keyword" value="<%=request("titleACT")%>" />
</font></td>
<td colspan="2"><font face="Arial, Helvetica, sans-serif">
<input type="submit" name="Submit" value="Search >>" />
</font></td>
</tr>
</table>
<div align="center"><br />
</div>
<div align="center">
<input name="Submit2" type="submit" onclick="MM_goToURL('parent','addrecord.asp');return document.MM_returnValue" value="Add Record" />
</div>
</form>
<div align="center">
<div align="center"><span class="resultscount2"><%=(rsSearch_total)%></span><span class="resultscount"> records match your criteria </span></div>
</div>
<table width="85%" border="0" align="center" cellpadding="1" cellspacing="0">
<tr>
<th><font face="Arial, Helvetica, sans-serif"><font size="2">Title</font></font></th>
<th>Location</th>
<th><font size="2" face="Arial, Helvetica, sans-serif">Activity</font></th>
<th> </th>
</tr>

<%
While ((Repeat1__numRows <> 0) AND (NOT rsSearch.EOF))
%>
<tr>
<td height="26"><%=(rsSearch.Fields.Item("titleACT").Value)%></td>
<td><font size="2" face="Arial, Helvetica, sans-serif"><%=(rsSearch.Fields.Item("venueACT").Value)%>, <%=(rsSearch.Fields.Item("townACT").Value)%></font></td>
<td><%=(rsSearch.Fields.Item("lifeestyleACT").Value)%></td>
<td><form id="form2" name="form2" method="post" action="">
<label for="Submit"></label>
<input name="Submit3" type="submit" id="Submit" onclick="MM_goToURL('parent','details.asp?UID=<%=(rsSearch.Fields.Item("UID").Value)%>');return document.MM_returnValue" value="Details" />
</form>
</td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsSearch.MoveNext()
Wend
%>
</table>
</body>
</html>
<%
rsSearch.Close()
Set rsSearch = Nothing
%>
 
Reply to this current thread  View this persons public profile  Send Private Message
   Re:Recordset keeps disopearing!  
View this persons public profile  gianluigi   10:42 2 Apr 2007  
   Re:Recordset keeps disopearing!  
View this persons public profile  [email protected]   5:24 11 Apr 2007  
Last Visit: Friday 1 Nov, 2024 10:28 pm First |  Prev |  Next |  Last  
 Login
Username:  Password:    
Read Message Read Message   Unread message Unread message
Read message [popular] Read message [popular]   Unread message [popular] Unread message [popular]
Read message [locked] Read message [locked]   Unread message [locked] Unread message [locked]
All times are GMT-1

Jump to: