<% Dim strR1 Dim strR3 Dim strBrand1 Dim strLimit1 Dim strH1 Dim strSRT1 Dim strP1 Dim strnewonly Dim strdate '*** Set the new date here ********* strdate = Date-2 '*** Set the new date here ********* 'The 8 Criteria - using request so it will work from the form or the query string strR1 = Request("R1") strR3 = Request("R3") strBrand1 = Request("Brand1") strLimit1 = Request("Limit1") strH1 = Request("H1") strSRT1 = Request("SRT1") if strSRT1 = "" then strSRT1 = "C_price" end if strP1 = Request("P1") strnewonly = Request("newck1") ' *********** START HERE *********************** call listings '*********SOUBROUTINE TO Page settings *********************** %> <% sub listings Select Case strR1 ' Living qtrs Case "All" strR1 = "%" Case "No" strR1 = "No" Case "Yes" strR1 = "Yes" End Select Select Case strR3 ' Pull type Case "V1" strR3 = "B" Case "V2" strR3 = "G" Case "V3" strR3 = "%" End Select 'State strLimit1 = Left(strLimit1,2) ' Get the first two letters of the state field strLimit1= strLimit1 & "%" '**** Get vars ready for paging Dim strrR1 Dim strrR3 Dim strrBrand1 Dim strrLimit1 Dim strrH1 Dim strrSRT1 Dim strrP1 Dim strrnewck1 strrR1 = strR1 strrR3 = strR3 strrBrand1 = strBrand1 strrLimit1 = strLimit1 strrH1 = strH1 strrSRT1 = strSRT1 strrP1 = strP1 strrnewck1 = request("newck1") '****** ' Now for current housework 'If new only is requested if strnewonly = "ON" then strnewonly = "GetDate()-7" else strnewonly = "GetDate()-360" end if %>

Year Horse Capacity Type Make Model Price Location  
<% Dim objConn Set objConn=Server.CreateObject("ADODB.Connection") objConn.open "Provider=SQLOLEDB; Data Source=sql.horsetrailerworld.com; User ID=d1; Password=dealer; Initial Catalog=trailern;" Dim objRS ' @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Dim iPageSize 'How big our pages are Dim iPageCount 'The number of pages we get back Dim iPageCurrent 'The page we want to show iPageSize = 150 If Request.QueryString("page") = "" Then iPageCurrent = 1 Else iPageCurrent = CInt(Request.QueryString("page")) End If '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Set objRS = Server.CreateObject("ADODB.Recordset") objRS.PageSize = iPageSize objRS.CacheSize = iPageSize '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Dim strSQL 'response.write "Normal Search" strSQL = "SELECT * FROM Cust Where C_a = 'A' AND C_DC = 'towlite' Order By "&strSRT1&" Asc;" 'response.write strSQL '@@@@@@@@@@@@@@@@@@@@@@@ need open static and lockReadonly @@@@@@@@@@@@@@@@ objRS.Open strSQL, objConn, adOpenStatic, adLockReadOnly, adCmdText objRS.PageSize = iPageSize iPageCount = objRS.PageCount iRecordCount = objRS.RecordCount '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 'response.write strSQL If iPageCurrent > iPageCount Then iPageCurrent = iPageCount If iPageCurrent < 1 Then iPageCurrent = 1 ' Check page count to prevent bombing when zero results are returned! If iPageCount = 0 Then %> <% Response.Write "**** No Records Found, Try Again! ****" %> <% Else 'The Big If objRS.AbsolutePage = iPageCurrent '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ %> <% ' Now that I've got the table header, pull the records and fill in the table! Dim strns Dim pic Dim strnew Dim strid Dim strdlr Dim bkg 'row background color bkg = "CCCCCC" 'da loop iRecordsShown = 0 Do While iRecordsShown < iPageSize And Not objRS.EOF strid = objRS("C_ID") strnew = "" if objRS("C_pic") = "Yes" then '------ put our camrea graphic next to the manufacturer pic = "" else pic = "" end if if objRS("C_sold_date") > 0 then '----- put our sold graphic nect to the manufacturer strns = "" else strns = "" end if if objRS("C_dealer") = "True" then '----- put a D in the column strdlr = "D" else strdlr = "" end if 'strBreak = Left(strLine, 1) %> <% iRecordsShown = iRecordsShown + 1 objRS.MoveNext if bkg = "CCCCCC" then bkg = "999999" else bkg = "CCCCCC" end if Loop %> <% ' All done -- Kill everything now! objRS.close Set objRS = Nothing objConn.close Set objConn = Nothing %>
" >sm.jpg" width="100" height="75" border="0"> <% = objRS("C_year")%>  " ><%Response.Write objRS("C_manu")%>  <%Response.Write Left(objRS("C_model"),25)%>    <%=pic%><%=strns%> <%= FormatCurrency(objRS("C_price"),0)%>
<% End if 'The Big IF end sub %>