ASP语法错误 (操作符丢失) 在查询表达式 'PaperId=' 中。 20
一个在线考试系统,在添加考试的时候出错,相关数据表是Test和Papers,提示MicrosoftJETDatabaseEngine错误'80040e14'语法错误(操作...
一个在线考试系统,在 添加考试的时候出错,相关数据表是Test和Papers,提示 Microsoft JET Database Engine 错误 '80040e14' 语法错误 (操作符丢失) 在查询表达式 'PaperId=' 中。 createTestadd.asp,行 59 :
creattest.asp
creattestadd.asp如下:
sql="select * from Test"set rs=server.createobject("adodb.recordset")rs.open sql,conn,3,2rs.addnewrs("PaperName")=request("PaperName")rs("StartTime")=request("StartTime")rs("endTime")=request("endTime")rs("TestName")=request("TestName")rs("PaperId")=request("PaperId")sqls="select * from Papers where PaperId="&request("PaperId")set rss=server.createobject("adodb.recordset")rss.open sqls,conn,3,2rs("Subject")=rss("Subject")rss.closeset rss=nothingrs.updaters.closeset rs=nothingsql="select Top 1 * from Test order by TestId desc"set rs=server.createobject("adodb.recordset")rs.open sql,conn,3,2TestId=rs("TestId")rs.closeset rs=nothing
StuId=split(request("StuId"),", ")cc=ubound(StuID)
for k=0 to ccsql="select * from TestStu"set rs=server.createobject("adodb.recordset")rs.open sql,conn,3,2rs.addnewrs("TestId")=TestIdrs("StuId")=StuId(k)rs("HaveTest")=0rs.updaters.closenextset rs=nothing %> 展开
creattest.asp
creattestadd.asp如下:
sql="select * from Test"set rs=server.createobject("adodb.recordset")rs.open sql,conn,3,2rs.addnewrs("PaperName")=request("PaperName")rs("StartTime")=request("StartTime")rs("endTime")=request("endTime")rs("TestName")=request("TestName")rs("PaperId")=request("PaperId")sqls="select * from Papers where PaperId="&request("PaperId")set rss=server.createobject("adodb.recordset")rss.open sqls,conn,3,2rs("Subject")=rss("Subject")rss.closeset rss=nothingrs.updaters.closeset rs=nothingsql="select Top 1 * from Test order by TestId desc"set rs=server.createobject("adodb.recordset")rs.open sql,conn,3,2TestId=rs("TestId")rs.closeset rs=nothing
StuId=split(request("StuId"),", ")cc=ubound(StuID)
for k=0 to ccsql="select * from TestStu"set rs=server.createobject("adodb.recordset")rs.open sql,conn,3,2rs.addnewrs("TestId")=TestIdrs("StuId")=StuId(k)rs("HaveTest")=0rs.updaters.closenextset rs=nothing %> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询