📄 inf_modify_pro_result.asp
字号:
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<%
var Pro;
var TableValue;
var CmdTextTable;
var CmdTextInsert;
var CmdTextDelete;
var rs;
Pro=Request.Form("Profession");
rs=Server.CreateObject("ADODB.Recordset");
rs.ActiveConnection=Conn;
rs.CursorLocation=3;
rs.Source="SELECT 成绩表名 FROM profession WHERE 所学专业='"+Pro+"'";
rs.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(!rs.EOF)
{
TableValue=rs.Fields(0).Value;
CmdTextTable="DROP TABLE "+TableValue;
Conn.Execute(CmdTextTable,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>");
}
CmdTextInsert="DELETE FROM profession WHERE 所学专业='"+Pro+"'";
Conn.Execute(CmdTextInsert,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>");
}
CmdTextDelete="DELETE FROM StudentInf WHERE 所学专业='"+Pro+"'";
Conn.Execute(CmdTextDelete,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>");
}
}
if(rs.EOF)
{
Response.Write("<div align=center><font size='6' color='#ff0000'>数据库发生错误,其中已无此专业!</font></div>");
}
rs.Close();
rs=null;
Conn.Close();
Conn=null;
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -