<% @ LANGUAGE = VBScript %> Perrin Realty of Maine - Home
Perrin Realty Residential Listings Commercial Listings Recreational Listings Acreage Listings Contact Perrin Realty
<% Dim Connect, Aroostook, Query, Category Category = Replace(Trim(Request("Category")),"||"," ") If Category = "" Then Response.Write "No Category specified.

" Else Set Connect = Server.CreateObject("ADODB.Connection") Connect.Open ODBCDNS Query = "SELECT * FROM Listings " Query = Query & "WHERE AgencyID=85 AND Activate=True AND Category='" & Category & "' ORDER BY (Price) " Set Aroostook = Connect.Execute(Query) %>

Looking for a specific price range? Enter your price range in the fields below and click the search button.
PLEASE DO NOT USE ANY PUNCTUATION, NUMBERS ONLY, FOR THE PRICE FIELDS.

<% Do While Not Aroostook.EOF %> <% Aroostook.MoveNext Loop End If %>
<% if (aroostook("Thumbnail")) <> "" AND (aroostook("Photo")) <> "" Then %> "> " border="0" width="100"> <%elseif (aroostook("Photo")) <> "" Then %> "> <% else %> "> <% end if %>
">MLS # <%=aroostook("ListNum")%>
<% if (aroostook("Style")) <> "" Then %> Style
<%=aroostook("Style")%> <% else %>   <% end if %>
<% if (aroostook("Bedrooms")) <> "" Then %> Bedrooms 
<%=aroostook("Bedrooms")%> <% else %>   <% end if %>
<% if (aroostook("LotSize")) <> "" Then %> Lot Size 
<%=aroostook("LotSize")%> <% else %>   <% end if %>
<% if (aroostook("Price")) <> "0" Then %> Price 
<%= FormatCurrency(Aroostook("Price"),0) %>
<%= Aroostook("TextPrice") %> <% else %>   <%= Aroostook("TextPrice") %> <% end if %>
<% if (aroostook("City")) <> "" Then %> Location:
<%=aroostook("Address")%>
<%=aroostook("City")%> <% else %> <% end if %>