%@ LANGUAGE="VBSCRIPT" %>
Student Information
<%
NameToLookup = Request.Form("INQUIRYNAME")
Set SurveyDB=Server.CreateObject("ADODB.Connection")
SurveyDB.Open sDSN, optimistic
InqSQL = "SELECT * FROM Students WHERE Name ='" & NameToLookup & "';"
set RS = SurveyDB.Execute(InqSQL)
%>
<% for i=0 to RS.Fields.Count - 1 %>
<% =RS(i).name %> |
<% next %>
<% While NOT RS.EOF %>
<% for i=0 to RS.Fields.Count - 1 %>
<% =RS(i).value %> |
<% next %>
<% RS.MoveNext %>
<% wend %>
<% SurveyDB.Close %>
Return to Main Page
Designed By
Brian J. Reithel, Ph.D.
based
on Listing 13.2, p. 322-323
from
Active Server
Pages Unleashed 2.0 by Walther, et al. (Sams Publishing)