<%@ LANGUAGE="VBSCRIPT" %> Student Information <% Set SurveyDB=Server.CreateObject("ADODB.Connection") SurveyDB.Open sDSN, optimistic ' ' the following SQL command retrieves all rows where the name is non-blank ' set RS = SurveyDB.Execute("SELECT * FROM Students WHERE Name > '';") %> <% 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)