查询代码如下,该如何需改
<%
'session.timeout=6000
'Server.ScriptTimeOut=2000
dim conn,rs,sysConfig,db
db="../data/database.mdb" '数据库文件位置
set conn=server.createobject("adodb.connection")
conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" &Server.MapPath(""&db&"")
Set rs = Server.CreateObject("ADODB.Recordset")
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
body,td,th {
font-size: 12px;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #9F0;
}
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<table width="735" border="1" align="center" cellpadding="5" cellspacing="0">
<tr>
<% set rs=server.CreateObject("adodb.recordset")
rs.open "select Points.PointID,Papername from Points,PointDCD where Points.PointID=PointDCD.PointID and Points.PaperID="&request("id")&"",conn,1,1
%>
<th height="10" colspan="3" scope="col"><%=rs("Papername")%></th>
</tr>
<tr>
<th width="208" height="10" scope="col"><strong>教学目标编号</strong></th>
<th width="251" scope="col">教学目标内容</th>
<th width="250" scope="col">达成度</th>
</tr>
<tr>
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select Points.PointID,PointDCD,PointName from Points,PointDCD where Points.PointID=PointDCD.PointID and Points.PaperID="&request("id")&"",conn,1,1
do while not rs.eof
%>
<td><%=rs("PointID")%></td>
<td><%=rs("PointName")%></td>
<td><%=rs("PointDCD")%>%</td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</table>
</form>
</body>
</html>
|