% 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") %>
| <%=rConn.Fields("StudentID").Value%> | <%=rConn.Fields("LastName").Value%> | <%=rConn.Fields("FirstName").Value%> | <%=rConn.Fields("Major").Value%> | <%=rConn.Fields("Year").Value%> | <%=rConn.Fields("GPA").Value%> |