Return to Main Page
Site Index

Trouble with drop box click here for help     Printing Instructions for Articles

Sermon, Lecture, Scripture Reading/Exposition Audio Search*

<% For Each strFormFieldName In Request.Form strFormNames = "strTemp=Request.Form(" & chr(34) & strFormFieldName & chr(34) & ")" Execute(strFormNames) strFormNames = strFormFieldName & "=strTemp" Execute(strFormNames) 'response.write strFormFieldName & " = " & eval(strFormFieldName) & "
" Next Function echo(strOut) Response.write strOut End Function Function die() Response.end End Function Function getValueFromArray(val, ar) getValueFromArray = "" For i = 0 to Ubound(ar)-1 testVal = Split(ar(i), "~") 'echo testVal(0) & "=" & val & "
" If NOT val = "null" Then If Cint(testVal(0)) = Cint(val) Then getValueFromArray = getValueFromArray & testVal(1) End If End If Next End Function Set adoCon = Server.CreateObject("ADODB.Connection") strDbPathAndName = Server.MapPath("websermons3.mdb") strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & strDbPathAndName adoCon.connectionstring = strCon adoCon.Open Set rsCommon = Server.CreateObject("ADODB.Recordset") %>
Search For A Phrase In The Sermon Title: Filter By The Following Occasion: Filter By The Following Speaker: Filter By Date Range:
<% strSQL = "SELECT DISTINCT Date From Sermons_Readings ORDER BY Date DESC" rsCommon.Open strSQL, adoCon Do While NOT rsCommon.EOF dte = dte & "
" rsCommon.MoveNext Loop rsCommon.Close %> Start: End:
Search For A Sermon By Book Of The Bible: Filter By Topic/Series: Maximum Search Results To Display:  
50   100   150   200   ALL     
<% If Request.Querystring("do") = "search" Then If Len(limit) > 0 Then strSQL = "SELECT Top " & limit & " * FROM Sermons_Readings WHERE ID > 0 " Else strSQL = "SELECT * FROM Sermons_Readings WHERE ID > 0 " End If If Len(searchText) > 0 Then strSQL = strSQL & " AND Title LIKE '%" & searchText & "%' " End If If Len(book) > 0 Then strSQL = strSQL & " AND Text LIKE '%" & book & "%' " End If If Len(series) > 0 Then strSQL = strSQL & " AND Series = " & series End If If Len(occasion) > 0 Then strSQL = strSQL & " AND occasion = " & occasion End If If Len(speaker) > 0 Then strSQL = strSQL & " AND speaker = " & speaker End If If Len(sDate) > 0 And Len(eDate) > 0 Then strSQL = strSQL & " AND Date BETWEEN #" & CDate(sDate) & "# AND #" & CDate(eDate) & "#" End If strSQL = strSQL & " ORDER BY Date DESC" 'echo strSQL rsCommon.Open strSQL, adoCon If rsCommon.EOF Then echo "Your Query Returned 0 Results. Please Try Again." die End If %> <% strHTML = "" recordCount = 0 Do While NOT rsCommon.EOF strHTML = strHTML & "" & vbcrlf strHTML = strHTML & "" & vbcrlf strHTML = strHTML & "" & vbcrlf strHTML = strHTML & "" & vbcrlf strHTML = strHTML & "" & vbcrlf strHTML = strHTML & "" & vbcrlf strHTML = strHTML & "" & vbcrlf strHTML = strHTML & "" & vbcrlf strHTML = strHTML & "" & vbcrlf strHTML = strHTML & "" & vbcrlf strHTML = strHTML & "" & vbcrlf rsCommon.MoveNext recordCount = recordCount + 1 Loop rsCommon.Close echo "

" & recordCount & " Records Found Matching Your Query.

" echo strHTML End If %>
Series Date Speaker Occasion Order of Worship Link to Sermon Title Text BuyTape
" & getValueFromArray(rsCommon("Series"), arSeries) & "" & rsCommon("Date") & "" & getValueFromArray(rsCommon("Speaker"), arSpeaker) & "" & getValueFromArray(rsCommon("Occasion"), arOccasion) & "" & rsCommon("Order of Worship") & "" & rsCommon("Link to Sermon") & "" & rsCommon("Title") & "" & rsCommon("Text") & "" & rsCommon("BuyTape") & "

Directions: Try to make as narrow a search as you need. Larger unbounded searches are likely to cause the search to fail. Attempting to return "All" without any other restrictions will cause the engine to attempt to return all the records in the database. This will likely cause the search to fail.

*This is our "trail" search. Please report any problems or suggestions to the web manager.