ADODB.Recordset 错误 '800a0cb3' 当前提供程序不支持从单一执行返回多个记录集。
ADODB.Recordset 错误 '800a0cb3'
当前提供程序不支持从单一执行返回多个记录集。
这个问题该怎么解决呀.........
<%
dim diff,Sections
diff=request("diff")
Sections=request("Sections")
session("sions")=sections
session("ff")=diff
set Conn=server.CreateObject("ADODB.connection")
dbpath=Server.MapPath("nettext.mdb")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=;Data Source="+dbpath
set rs=server.CreateObject("ADODB.recordset")
sql="SELECT*FROM question ORDER BY Id"
PgSz=1'定每一页所显示的题数目
RS.open sql,Conn,1,1
If RS.RecordCount=0 then
response.write"<P><center>对不起,数据库中没有相关信息</center></P>"
else
RS.PageSize=Cint(PgSz) '设定PageSize属性的值
Total=INT(RS.recordcount/PgSz*-1)*-1'计算可显示页面的总数
PageNo=Request("pageno")
if PageNo=""Then
PageNo=1
else
PageNo=PageNo+1
PageNo=PageNo-1
end if
ScrollAction=Request("ScrollAction")
if ScrollAction="上一题"Then
PageNo=PageNo-1
end if
if ScrollAction="下一题"Then
PageNo=PageNo+1
end if
if PageNo<1Then
PageNo=1
end if
n=1
RS.AbsolutePage=PageNo
Response.Write"<CENTER>"
position=RS.PageSize*PageNo
pagebegin=position-RS.PageSize+1
if position<RS.RecordCount then
pagend=position
else
pagend=RS.RecordCount
end if
Response.Write"<br><br><P><font color='Navy'><B>数据库查询结果:</B>"
Response.Write"(共有"&RS.RecordCount &"条题目等着完成!)</font></p><br>"
Response.Write"<TABLE WIDTH=600 BORDER=3 CELLPADDING=4 CELLSPACING=0 BGCOLOR=#FFFF00>"
Response.Write"<TR BGCOLOR=#0099ff>"
Do while not(RS is nothing)
RowCount=RS.PageSize
Do While Not RS.EOF and rowcount>0
If n=1 then
Response.Write"<TR BGCOLOR=#0099ff>"
ELSE
Response.Write"<TR BGCOLOR=#0099ff>"
End If
n=1-n %>
<%
Response.Write"<b>(选择题:"&pagebegin&"-"&pagend&")</b></font></p>"
%>
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
<script language="JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
//-->
</script>
<body bgcolor="#0099FF">
<div id="Layer1" style="position:absolute; left:152px; top:130px; width:539px; height:48px; z-index:1; background-color: #0099FF; layer-background-color: #0099FF; border: 1px none #000000"></div>
<P>
<td> <b><font color="blune"><%=rs("que")%></font></b>
<P> A、<%=rs("choicea")%>
<P> B、<%=rs("choiceb")%>
<p> C、<%=rs("choicec")%>
<P> D、<%=rs("choiced")%>
</td>
<p onMouseOver="MM_showHideLayers('Layer1','','hide')" onMouseOut="MM_showHideLayers('Layer1','','show')">
<br>
查看答案:<b><font color="red"><%=rs("answer")%></font></b>
<br>
<%
RowCount=RowCount-1
RS.MoveNext
Loop
set RS=RS.NextRecordSet
loop
conn.close
set rs=nothing
set Conn=nothing
%></table>
<form Method=get acction="(answer.asp)">
<input type="hidden"name="pageno"value="<%=pageNo%>">
<%
if PageNo>1Then
response.write "<INPUT TYPE=SUBMIT NAME='ScrollAction'VALUE='上一题'>"
end if
if RowCount=0 and PageNo<>Total then
response.write "<INPUT TYPE=SUBMIT NAME='ScrollAction'VALUE='下一题'>"
end if
response.write"</FORM>"
end if
%>