<% If Request.Cookies("Webmaster") <> "Validated" Then Response.Redirect("/ctrfiles/stats/login.asp") End if If Request.Form("btnSearch") = "Search" Then Dim MyFile MyFile = Server.MapPath("/database/houseview.mdb") Dim DataConnection, cmdDC, RecordSet Dim SearchText SearchText = Request.Form("txtSearchText") SearchText = Replace(SearchText,"'","''") Set DataConnection = Server.CreateObject("ADODB.Connection") DataConnection.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & MyFile & ";" Set cmdDC = Server.CreateObject("ADODB.Command") cmdDC.ActiveConnection = DataConnection SQL = "SELECT * " SQL = SQL & "FROM Listings " SQL = SQL & "WHERE (((Listings.MLS) Like '%" & SearchText & "%')) OR (((Listings.price) Like '%" & SearchText & "%')) OR (((Listings.Bthrm) Like '%" & SearchText & "%'))" SQL = SQL & "OR (((Listings.Bdrm) Like '%" & SearchText & "%')) OR (((Listings.Location) Like '%" & SearchText & "%')) OR (((Listings.address) Like '%" & SearchText & "%'))" SQL = SQL & "OR (((Listings.homedesc) Like '%" & SearchText & "%')) OR (((Listings.RealitorAbb) Like '%" & SearchText & "%')) OR (((Listings.ID) Like '%" & SearchText & "%')) ORDER BY Listings.MLS;" cmdDC.CommandText = SQL Set RecordSet = Server.CreateObject("ADODB.Recordset") RecordSet.Open cmdDC, , 2, 2 End if Dim strtotal strtotal = 0 Function GetShootType(shoottype) Select Case shoottype Case "0" GetShootType = "N/A" Case "1" GetShootType = "I/O" Case "2" GetShootType = "O/O" Case "3" GetShootType = "MLS" Case "4" GetShootType = "Rnt" Case Else GetShootType = "N/A" End Select End Function %> -=Administration=-
  Administration Database Search::.
<% if Request.Querystring("mode") = "doit" AND Request.Form("btnSearch") = "Search" then If Not RecordSet.BOF Then RecordSet.MoveFirst Do Until RecordSet.EOF if bgcolor = "#ffffff" then bgcolor = "#e6e6e6" else bgcolor = "#ffffff" end if if RecordSet.Fields("Pending") = "Yes" then bgcolor="Yellow" end if Response.Write("" & Chr(13)) Response.Write(" " & Chr(13)) Response.Write(" " & Chr(13)) Response.Write(" " & Chr(13)) Response.Write(" " & Chr(13)) Response.Write(" " & Chr(13)) Response.Write(" " & Chr(13)) Response.Write(" " & Chr(13)) Response.Write(" " & Chr(13)) Response.Write(" " & Chr(13)) Response.Write(" " & Chr(13)) Response.Write(" " & Chr(13)) Response.Write(" " & Chr(13)) Response.Write(" " & Chr(13)) Response.Write(" " & Chr(13)) Response.Write(" " & Chr(13)) Response.Write(" " & Chr(13)) Response.Write("" & Chr(13)) if RecordSet.Fields("homedesc") <> "" then Response.Write("" & Chr(13)) Response.Write(" " & Chr(13)) Response.Write(" " & Chr(13)) Response.Write("" & Chr(13)) end if RecordSet.MoveNext Loop End If RecordSet.Close Set RecordSet = Nothing Set cmdDC = Nothing DataConnection.Close Set DataConnection = Nothing End if %>
ID I/O MLS# Price Bath Bdrm address Location Address Agent Type Status Listing date 1st Ivoice date Sold date 2nd Invoice date
" & RecordSet.Fields("ID") & "" & RecordSet.Fields("Pano") & "" & RecordSet.Fields("MLS") & "" & FormatCurrency(RecordSet.Fields("price"),0,0) & "" & RecordSet.Fields("Bthrm") & "" & RecordSet.Fields("Bdrm") & "" & RecordSet.Fields("address") & "" & RecordSet.Fields("Location") & "" & RecordSet.Fields("address") & "" & RecordSet.Fields("RealitorAbb") & "" & GetShootType(RecordSet.Fields("shoottype")) & "" & RecordSet.Fields("Pending") & "" & RecordSet.Fields("listingdate") & "" & RecordSet.Fields("invoicedate") & "" & RecordSet.Fields("solddate") & "" & RecordSet.Fields("invoicedate2") & "
" & RecordSet.Fields("MLS") & " " & "Desc:" & RecordSet.Fields("homedesc") & "


Search the database

Search notes:

  • Use whole numbers ex; $169,000 = 169000 on price searches
  • To Find Agent's Listings use Abbreviation's ex; Jane Clark = janec
  • Put a space between keywords if searhing for more than one word
  • Closer to the original phrase the more specific the matches will be
  • Click MLS Number to edit that Listing