smallclassadd.asp
来自「这是一个学生毕业时做的教务系统」· ASP 代码 · 共 43 行
ASP
43 行
<!--#INCLUDE FILE="Conn.asp" -->
<%
IF Session("KEY")<>"super"THEN
response.redirect "index_face.asp"
response.end
END IF
dim typename
dim howmany
sBigClassName=request("bigclassName")
typename=request("type")
howmany=request("howmany")
If typename="" Then
response.write "不能为空!"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from smallclass"
rs.open sql,conn,3,3
do while not rs.eof
if rs("SmallClassName")=typename then
response.write "已经存在这个SmallClassName名称!请<a href=javascript:history.go(-1)>返回重新填写</a>!"
response.end
end if
rs.movenext
loop
rs.close
set rs=nothing
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from smallclass"
rs.open sql,conn,1,3
rs.addnew
rs("SmallClassName")=typename
rs("SmallClassID")=howmany+1
rs("BigClassName")=sBigClassName
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.redirect "SmallClass.asp"
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?