<% Dim objBadges, rsBadges Set objBadges = Server.CreateObject("ADODB.Connection") strConnection = "DSN=intranet;Database=intranet;UID=intranet;pwd=application;" objBadges.open strConnection Set rsBadges = Server.CreateObject("ADODB.Recordset") %> <% rsBadges.Open "Select * from artest where Employer='ADT Security Services' ORDER BY FirstName, LastName, Employer, CardNo, ExpDate, Status", objBadges %> <% while not rsBadges.EOF %> <% rsBadges.MoveNext Wend response.write("
First Name Last Name Employer Card # Exp. Date Status
<%= rsBadges.Fields("FirstName")%>  <%= rsBadges.Fields("LastName")%>  <%= rsBadges.Fields("Employer")%>  <%= rsBadges.Fields("CardNo")%>  <%= rsBadges.Fields("ExpDate")%>  <%= rsBadges.Fields("Status")%> 
")%> <% 'rsForm.Close() Set rsBadges = Nothing objBadges.Close() Set objBadges = Nothing %>