<% oConn.Open(sConnString) 'This opens the database. 'This program displays all of the records in a given database. 'Your database must be uploaded in a folder called db. 'The name of your database must be test.mdb 'The name of your table must be Table1 'Change only the information that is between the " ". 'Be sure that each of your field names are entered correctly. 'You will need an rConn.Fields command for each field in your database. Set rConn = oConn.Execute("SELECT * FROM Table1") %> My First ASP Page <%Do While Not rConn.EOF%> <%rConn.MoveNext Loop %>
<%=rConn.Fields("ID").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 %>