BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除
<%@ Language=VBScript %>
<% option explicit %>
<!--#include file="conn.asp"-->
<%
if session("studentname")="" then
   Response.Redirect "default.asp"
end if
%>
<html>
<head>
<title>考试界面----再线考试系统</title>
</head>
<script language="javascript">
function attention()
{
   alert('时间到了,请交卷!');
   document.getElementById('submit').click();
}
setTimeout("attention()",<%=session("testtime")*60*1000%>)
</script>
<body bgcolor="#FFFFFF" background=images/backimage.gif>
<p align="center"><b><font face="宋体" size="5" color="#FF0000"><%=session("selectsubjectname")%>考试</font></b></p>
<%
if request.form("submit1")="开始考试"  then
%>
<form name="testform" method="post" action="result.asp">
   <table border="0" cellspacing="0"  bordercolor="#111111" width="100%" >
     <tr>
       <td width="100%" height="25"><b><font size="3" color="#000080">一、单项选择题(每题<%=session("singleper")%>分,共<%=session("singlenumber")%>题)</font></b></td>
     </tr>
   </table>
<%
   dim i,sql,rs,count,temp,strid1,strid2
   strid1=""
   strid2=""
   randomize
  for i=1 to session("singlenumber")
  'for i=1 to CInt(CStr(Request.Cookies("singlenumber")))
     set rs=server.createobject("adodb.recordset")
	'  sql="select * from question where subjectname='"& Request.Cookies("selectsubjectname") & "'and type='单选题' and haveselect=0 "
     sql="select * from question where subjectname='"&session("selectsubjectname") & "'and type='单选题' and haveselect=0 "
     rs.open sql,conn,3,4
     count=rs.recordcount
     temp=fix(count*rnd(10))
     rs.move temp
     rs("haveselect")=1
     strid1=strid1 & rs("ID") & ","
%>
   <table border="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#C0C0C0" width="100%"  cellpadding="0">
     <tr>
       <td width="100%" bgcolor="#EFEFEF" height="20">  <b><%=i%>、<%=rs("question")%></b></td>
     </tr>
<%
     if rs("A")<>"" then
%>
     <tr>
       <td width="100%">    <input type="radio" name="NO<%=rs("id")%>" value="A">A、<%=rs("A")%></td>
     </tr>
<%
     end if
     if rs("B")<>"" then
%>
     <tr>
       <td width="100%">    <input type="radio" name="NO<%=rs("id")%>" value="B">B、<%=rs("B")%></td>
     </tr>
<%
     end if
     if rs("C")<>"" then
%>
     <tr>
 &