<% '_______________________________________ ' DIMension the variables used Dim x, ccsn ' Prepare the SQL statement that ' retrieves the selected student strSQL="SELECT * FROM students " strSQL=strSQL & "ORDER BY lastname;" '___________________________________________ ' Set up a connection objCommand.CommandText = strSQL '------------------------------------------------------------- ' Capture the selected record in a recordset. records.Open objCommand, , adOpenDynamic, adLockOptimistic Set objCommand = Nothing '_____________________________________________ ' Place the data in a form to allow for corrections. %> Class Roster

Roster

<%x=1 while not records.eof if records("ccsn")<>477363 then%> <% x=x+1 End if records.movenext wend '_______________________________________________ ' close the recordset and tidy up '_______________________________________________ records.close set records=Nothing %>
ID FIRST LAST URL
Inst Charles Muench citweb.ccsn.net/252bass/
<%= x%> <%= records("firstname")%> <%= records("lastname")%> index.html"><%= records("site") %>