Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft OLE DB Provider for ODBC Drivers
[Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是 1。
/check.asp,行18 login.asp 文件内容如下: <% set conn_str=server.createObject("ADODB.Connection") dbpath_str=server.MapPath("ks_auto.mdb") conn_str.open "driver={microsoft Access driver (*.mdb)};dbq="&dbpath_str sql_str2="select sj_name from sj_large" set rs2=conn_str.execute(sql_str2) %> <html> <head> <title>考试系统</title> </head> <body> <center> <h3>考试系统登录</h3> <form action="check.asp" method="post"> <P>科目:<select name="subject"> <% do while not rs2.eof Response.Write"<option>"&rs2("sj_name")&"</option>" rs2.movenext loop %> </select> </P> <p> 你是:<select name="type"> <option>学生</option> <option>教师</option> </select> </p>
<p> 姓名:<input name="name" type="textbox"> 密码:<input name="pass" type="password"> </p>
<p> <input name="sub1" type="submit" value="登录"> </p> </form> </center>
</body> <% rs2.close set rs2=nothing
conn_str.close set conn_str=nothing %> </html> login.asp文件在IE中打开正确 check.asp文件内容如下: <!-- METADATA TYPE="typelib" FILE="C:\Program Files\Common Files\System\ado\msado15.dll" --> <% subject1=Request.Form("subject") type1=Request.Form("type") name1=Request.Form("name") password1=Request.Form("pass") %> <% set conn_str=server.createObject("ADODB.Connection") dbpath_str=server.MapPath("ks_auto.mdb") conn_str.open "driver={microsoft Access driver (*.mdb)};dbq="&dbpath_str if Request.Form("type")="教师" then sqlstr2="select * from sj_large where sj_name='"&subject1&"' and sj_teacher='"&name1&"' and teac_pwd='"&password1&"' and isready='false'" set rs2=conn_str.Execute(sqlstr2) //出错提示指的是此行 if not rs2.eof then session("sj_name")=subject1 session("name")=name1 Response.Redirect "sj_frame.asp" else Response.Write "<a href='' onclick='javascript:window.close()'>试卷已提交或者登录帐号错误,关闭本窗口</a>" end if end if if Request.Form("type")="学生" then sqlstr1="select * from stud_scor where name='"&name1&"' and pwd='"&password1&"'" set rs1=conn_str.Execute(sqlstr1) if rs1.eof then Response.Write"<a href='' onclick='javascript:history.go(-1)'>登录帐号出错,点击并返回</a>" else session("subject")=subject1 session("name")=name1 Response.Redirect "ks.asp" end if end if rs1.close set rs1=nothing rs2.close set rs2=nothing conn_str.Close set conn_str=nothing %>
代码虽有些长,但都很简单,我认为全部写出来才好分析 我实在是找不出哪里有错了,请各位大虾指点
[此贴子已经被作者于2005-4-23 9:19:28编辑过]