<%
if request.form("stuid")<>"" and request.form("couid") <>""then
stuid=request.form("stuid")
couid=request.form("couid")
'下面将建立连接数据库jxgl.mdb，建立Connection对象
	Dim cnn,strConn
	strConn="Dbq=" & Server.Mappath("jxgl.mdb") & _
	";Driver={Microsoft Access Driver (*.mdb)}"
	Set cnn=Server.CreateObject("ADODB.Connection") 
	cnn.Open strConn
	Dim strSql,rs
	strsql="select xsxx.学号,姓名,xsxx.性别,xx.成绩  "& _
	"from (xsxx inner join xx on xsxx.学号=xx.学号) where xsxx.学号='"&stuid& "'and xx.课程代号='"&couid&"'"
    set rs =cnn.execute(strsql)
%>
<center>
	<table border="1">
	<tr>
	<td>学号</td>
	<td>姓名</td>
	<td>性别</td>
	<td>成绩</td>
	</tr>
	<%Do While Not rs.Eof %>
	<tr>
	<td><%=rs("学号")%></td>
	<td><%=rs("姓名")%></td>
	<td><%=rs("性别")%></td>
	<td><%=rs("成绩")%></td>
	</tr>
	<%
	rs.MoveNext
	Loop
	%>
	</table>
	</center>
<%
end if
%>


