<% DIM sqlString DIM strLastName, strFirstName DIM strMajor, strYear DIM strStudentID strStudentID = Request.Form("StudentID") strLastName = Request.Form("LastName") strFirstName = Request.Form("FirstName") strMajor = Request.Form("Major") strYear = Request.Form("Year") oConn.Open(sConnString) 'This opens the database. sqlString = "UPDATE Table1 SET LastName = '"& strLastName &"', FirstName = '"& strFirstName &"'," sqlString = sqlString & "Major = '"& strMajor &"', Year = '"& strYear &"'" sqlString = sqlString & "WHERE StudentID = '"& strStudentID &"'" Set rConn = oConn.Execute(sqlString) Set rConn = oConn.Execute("SELECT * FROM Table1 ORDER BY LastName, FirstName") %> Record Insert <% Response.Write strLastName %> <%Do While Not rConn.EOF%> <%rConn.MoveNext Loop %>
<%=rConn.Fields("StudentID").Value%> <%=rConn.Fields("LastName").Value%> <%=rConn.Fields("FirstName").Value%> <%=rConn.Fields("Major").Value%> <%=rConn.Fields("Year").Value%> <%=rConn.Fields("GPA").Value%>
<% 'Destroy the connections oConn.Close set oConn = Nothing %>