<%@ LANGUAGE="VBSCRIPT" %> Student Information These records have been removed from the directory

<% ' This code will first display all the records that match the name ' that was entered. Then, after they have been displayed, they will ' be deleted. ' NameToLookup = Request.Form("DELETENAME") Set SurveyDB=Server.CreateObject("ADODB.Connection") SurveyDB.Open sDSN, optimistic InqSQL = "SELECT * FROM Students WHERE Name ='" & NameToLookup & "';" set RS = SurveyDB.Execute(InqSQL) %> <% While NOT RS.EOF %> <% RS.MoveNext %> <% wend %>
Student NameEmail Address
<% =RS("Name") %>   "><% =RS("Email") %> 
<% DelSQL = "DELETE FROM Students WHERE Name ='" & NameToLookup & "';" SurveyDB.Execute(DelSQL) SurveyDB.Close %>

Return to Main Page