<%@ 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 %> <% next %> <% While NOT RS.EOF %> <% for i=0 to RS.Fields.Count - 1 %> <% next %> <% RS.MoveNext %> <% wend %>
<% =RS(i).name %> 
<% =RS(i).value %> 
<% 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)