<% SQL = "Select * From PropertyInfo Where (PropertyCategory like '%news%') AND (Retired = 0)" & " ORDER BY Address ASC "
session("SQL") = sql
set TempRs = server.createobject("Adodb.recordset")
TempRs.open sql,oconn,2,3,adcmdtext
%>
<%
'Declare property count page break variable
RepeatCount = 0
do while not TempRs.EOF
%>
<%If not TempRs.EOF then%>
<%
PropertyID= TempRS("PropertyID")
Address = TempRS("Address")
Notes = TempRS("Notes")
PropDescription = TempRS("Description")
%>
<%
PropImage = NewImFileLoc & PropertyID & ".jpg"
if fso.FileExists(PropImage) = True then
PropImage = "../OakleyImages/" & PropertyID & ".jpg"
ELSE
PropImage = "../images/logo.jpg"
END IF
%>
<%=Address%>
<%=PropDescription%>
<%
TempRS.MoveNext
end if
%>
<%
Loop
%>
<%
Set fso = Nothing
If IsObject(Oconn) then
Oconn.close
set oconn = nothing
End if
%>