% strLetter = request("Letter") ' 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 TblLogin where AgencyName like '" + strLetter + "%' and (AccessLevel = '2' or AccessLevel = '6') order by AgencyName" 'Set the recordset object equal to the SQL query string objRS.Open SQL, objADO, 1, 3 ' Create a recordset object to store specific table information Set objRS2 = Server.CreateObject("ADODB.Recordset") 'Establish what records you want selected for the SQL query string SQL = "Select * From TblAlphabet" 'Set the recordset object equal to the SQL query string objRS2.Open SQL, objADO, 1, 3 %>
DEALER SEARCH
Agents By Alphabetical Listing: <%= strLetter %>
| "><%= objRS2("Alphabet") %> | <% objRs2.MoveNext %> <% wend %>
<% if not objrs.EOF then %>
| Name | Phone | City | State | View Listings |
| "><%= objRs("AgencyName")%> | <%= formatPhoneNumber(objRs("PhoneNumber")) %> | <%= objRs("City") %> | <%= objRs("State") %> | ">My Listings |
Currently we do not have dealers whose last name begins with <%= strLetter %>. New dealers are always being added. Please check back again soon. <% end if %>