<% option explicit%>
<% response.Buffer=true%>
<!--#include file="conn.asp"-->
<%
if session("usertype")<>"admin" then
response.write "只有管理员有有此权限"
response.end
end if
dim class ,rs,sql,rxsj,sql1'这里出错了,提示出dim___class,rs,rxsj,sql1 提示缺少标识符!
class=trim(request("class"))
rxsj=trim(request("rxsj"))
if class="" then
response.write "班级不能为空"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from class where class='"&classes&"'and info='"&rxsj&"'"
rs.open sql,conn,1,3
%>
<%
if not rs.eof then
response.write "该班级已存在"
response.end
else
rs.addnew
rs("class")=class
rs("info")=rxsj
rs.update
rs.close
set rs=nothing
response.redirect "class_manage.asp"
end if
%>
第1个回答 2010-01-14
此句少了一个空格:
sql="select * from class where class='"&classes&"'and info='"&rxsj&"'"
sql="select * from class where class='"&classes&"' and info='"&rxsj&"'"
还有就是程序里根本没有classes这个变量本回答被提问者采纳
sql="select * from class where class='"&classes&"'and info='"&rxsj&"'"
sql="select * from class where class='"&classes&"' and info='"&rxsj&"'"
还有就是程序里根本没有classes这个变量本回答被提问者采纳