📄 inf_delete_student_result.asp
字号:
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<%
var StudentId;
var StudentPro;
var GradeTable;
var Commandtext;
var StuTable;
var StuInsert;
var Rs;
StudentId=Request.QueryString("studentmessage");
StuTable=Server.CreateObject("ADODB.Recordset");
StuTable.ActiveConnection=Conn;
StuTable.CursorLocation=3;
StuTable.Source="SELECT * FROM student WHERE studentNo="+StudentId;
StuTable.Open();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>学生信息删除结果</title>
<!--#include file="link.asp"-->
</head>
<body>
<!--#include file="top.asp"-->
<%
if(StuTable.EOF)
{
Response.Write("<div align=center><font size='6' color='#ff0000'>数据库数据已丢失,删除失败!</font></div>");
}
else
{
Commandtext="DELETE FROM student WHERE studentNo="+StudentId;
var deleteScoreOfThisStudent = "delete from score where studentId = "+StudentId;
Conn.Execute(deleteScoreOfThisStudent,0,0);
if(Conn.Errors.Count>0)
{
Response.Write("<div align=center><font size='6' color='#ff0000'>系统发生"+Conn.Errors.Count+"个错误!</font></div>");
}
else
{
Conn.Execute(Commandtext,0,0);
}
if(Conn.Errors.Count>0)
{
Response.Write("<div align=center><font size='6' color='#ff0000'>系统发生"+Conn.Errors.Count+"个错误!</font></div>");
}
else
{
Response.Write("<div align=center><font size='6' color='#ff0000'>数据从信息表中删除成功!</font></div>");
}
}
StuTable.Close();
Conn.Close();
Conn=null;
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -