Network <%@ language=vbscript%>
<HTML>
<HEAD>
<meta name= "generator" content= "Microsoft Visual Studio 6.0" >
</HEAD>
<BODY>
<p Align=center><font Color=crimson face= Young Round
Size=4><strong> Select the course you want to view </STRONG></FONT></P>
<p align=center>
<table border=1 cellpadding=1 cellspacing=1 width=75%>
<TR>
<TD> Course Name </TD>
<TD> Course Teacher </TD>
</TR>
<%
' Create a database connection object
Set Conn=server. CreateObject ("Adodb.connection")
Conn. Connectionstring= "Dsn=testsys"
Conn. Open
' Define the SQL statement and query the account from the database for the student test
Strsql= "SELECT distinct score.sub,score.teachid,teacherinfo.teachname from Score,teacherinfo where score.teachid= Teacherinfo.teachid "
Set Mrs=conn. Execute (strSQL)
While not mrs.eof
' Show each test subject in tabular form
Response.Write "<TR>"
Response.Write "<TD>"
Response.Write "<a href=tviewscore.asp?teachname=" & Mrs ("Teachname") & "&teachid=" & Mrs ("Teachid") ) & "&sub=" & Mrs ("Sub") & ">" & Mrs ("Sub") & "</a>"
Response.Write "</TD>"
Response.Write "<TD>" & Mrs ("Teachname") & "</TD>"
Response.Write "</TR>"
Mrs.movenext
Wend
' Close the database connection object
Conn. Close
' Empty object variable
Set conn=nothing
%>
</TABLE></P>
<P> </P>
</BODY>
</HTML>