<% Dim cnnSimple ' ADO connection Dim rstSimple ' ADO recordset Set cnnSimple = Server.CreateObject("ADODB.Connection") cnnSimple.Provider = "Microsoft.Jet.OLEDB.4.0" cnnSimple.Open Server.MapPath("registration.mdb") Set rstSimple = cnnSimple.Execute("SELECT * FROM student where studentID='12345'") %>
StudentNameMajorCredit Hours
<%=rstSimple.Fields(0).Value %> <%=rstSimple.Fields(1).Value %> <%=rstSimple.Fields(2).Value %> <%=rstSimple.Fields(3).Value %>
<% rstSimple.Close Set rstSimple = Nothing cnnSimple.Close Set cnnSimple = Nothing %>