<% Response.Expires = 0 %> Genesee County Humane Society
<% SEARCH_TEXT="All Veterinary Facilities" %>
 
 

Vets help pets stay healthy.

<% ' this code opens the database ORDERBY=request.querystring("ORDERBY") if ORDERBY = "" then ORDERBY = "CLINIC" end if numrecords = "0" set conn = Server.CreateObject("ADODB.Connection") conn.open "DSN=GENESEE;uid=nothing;pwd=nothing" sql = "select count(clinic) from VET_CLINICS where CLINIC <> '[Select]'" set rs = conn.execute(sql) if not rs.eof then numrecords = rs(0) sql = "select * from VET_CLINICS where CLINIC <> '[Select]' order by " & ORDERBY set rs = conn.execute(sql) 'response.write("There are " & numrecords & " records listed.") '//SECURITY TO MAKE SURE THE PAGE DOES NOT GET PROPOGATED IF NO RECORDS EXIST. SENDS USER TO searchfail.asp If numrecords = "0" then %> No results match. <%else%> The following matched your search of "<%=SEARCH_TEXT%>":

There are <%=numrecords%> facilities listed. <% ' Now lets grab all the records DO UNTIL rs.eof ' put fields into variables ID=rs("ID") Clinic=rs("Clinic") Street_1=rs("Street_1") Street_2=rs("Street_2") City=rs("City") State=rs("State") Zip=rs("Zip") Phone=rs("Phone") %> <% rs.movenext LOOP end if rs.close set rs=nothing %>
&ORDERBY=CLINIC">Organization &ORDERBY=CITY">City &ORDERBY=STATE">State &ORDERBY=PHONE">Phone
       
<%=CLINIC%>  <%=CITY%>  <%=STATE%>  <%=PHONE%>