<% cat = request("cat") ' Create a recordset object to store specific table information Set objRS = Server.CreateObject("ADODB.Recordset") 'Establish what records you want selected for the SQL query string SQL = "Select * From TblServices where Category = '" + cat + "' and Expires >= #" & Date() & "# order by State, City" 'Set the recordset object equal to the SQL query string objRS.Open SQL, objADO, 1, 3 %>

SERVICES DIRECTORY - (<%= ucase(cat) %>)

<% if objrs.eof then %> Sorry. No companies are listed in our service directory for <%= cat %> at this time. We are always adding new affiliations. Please check back again soon.

Click here to add your company's services to our directory. <% else %>

<% while not objrs.EOF %>
<% if objrs("website") <> "" then %> "><%= objrs("Company") %> <% else %> <%= objrs("Company") %> <% end if %> - <%= objrs("description") %>
<%= objrs("city") %>, <%= objrs("state") %>

<% objrs.MoveNext %> <% wend %> <% end if %>