![]() |
VBScript Sample: vbscript/ado/studentreg/display.asp |
|
||||||
|
||||||||
<html> <head> <title>List of Students</title> </head> <body bgcolor="eadfdf"> <h1 align="center"><font face="Verdana, arial, helvetica" color="#003333">Student List</font></h1> <font face="Verdana, arial, helvetica"> <hr align="center"> </font><div align="center"><center> <table border="1" width="100%" cellpadding="5" bordercolorlight="#666666" bordercolordark="#333333"> <tr> <th> </th> <th><font face="Verdana, arial, helvetica">Student Name</font></th> <th><font face="Verdana, arial, helvetica">E-mail</font></th> <th><font face="Verdana, arial, helvetica">Company</font></th> <th><font face="Verdana, arial, helvetica">Course Expectations</font></th> </tr> <% Dim lastname Dim firstname Dim email Dim company Dim courseexpectations Dim courselocation Dim CourseStartDate Dim i Set a = server.CreateObject("ADODB.CONNECTION") a.open "DSN=studentdatabase;UID=;PWD=;" Set b = a.execute("select * from Students ") Set c = b.fields i = 0 While Not b.EOF lastname = c.Item(1).Value firstname = c.Item(2).Value email = c.Item(3).Value company = c.Item(5).Value courseexpectations = c.Item(8).Value i = i + 1 b.movenext %> <tr> <th><font face="Verdana, arial, helvetica"><%=cstr(i)%> </font></th> <th><font face="Verdana, arial, helvetica"><%=lastname+" "+firstname%> </font></th> <th><font color="#0000ff" face="Verdana, arial, helvetica"><a href><%=email%> </a></font></th> <th><font face="Verdana, arial, helvetica"><%=company%> </font></th> <th><font face="Verdana, arial, helvetica"><%=courseexpectations%> </font></th> </tr> <% Wend %> </table> <% a.Close %> </center></div><font face="Verdana, arial, helvetica"> <p> <a href="studentindex.html"><font size="3" color="#0000ff">-----Return-----</font> </p> </a></font> </body> </html> |
||||||||
|
||||||||
Copyright © 1998-2002, Halcyon
Software Inc. All rights reserved.
|