柬埔寨服装:[诚心求教]ADODB.Recordset (0x800A0BB9)参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/09 17:07:17
<%
id=request("id")
subject=request("subject")
if subject="单选题" then sql="select * from s_xuanze where id="&id end if
if subject="多选题" then sql="select * from m_xuanze where id="&id end if
if subject="判断题" then sql="select * from 判断题 where id="&id end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
if (subject="单选题" or subject="多选题") then
typeedit=subject
question=rs("question")
text1=rs("A")
text2=rs("B")
text3=rs("C")
text4=rs("D")
answer=rs("answer")
else
typeedit=subject
question=rs("p_question")
text1=rs("p_A")
text2=rs("p_B")
answer=rs("p_answer")
end if
%>
错误的是这句rs.open sql,conn,3,2

用楼下的方法无效………………

if subject="单选题" then sql="select * from s_xuanze where id="&id&"" end if
if subject="多选题" then sql="select * from m_xuanze where id="&id&"" end if
if subject="判断题" then sql="select * from 判断题 where id="&id&"" end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2