📄 infodel2.asp
字号:
<!--#include file="CheckLogin.asp"-->
<!--#include file="Connections/StudentConn.asp" -->
<%
Sub DelRecord(StudentNum) '删除记录
MM_editConnection = MM_StudentConn_STRING
MM_editQuery = "delete from StudentInfo where StudentNum = '" & cstr(StudentNum) & "'"
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
if err.Number<>0 then
err.clear
response.write "删除 " & cstr(StudentNum) & " 失败!<br>"
else
response.write "删除 " & cstr(StudentNum) & " 成功!<br>"
end if
End sub
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>删除学生信息</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2600.0" Name=GENERATOR>
<link href="home.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0>
<!--#include file="Top.asp"-->
<TABLE cellSpacing=0 cellPadding=0 width=750 align=center border=0>
<TBODY>
<TR>
<TD vAlign=top width=46 background=images/p_left_2.gif></TD>
<TD height="200" width="20" align="center"> </TD>
<TD height="200" width="679" valign="top" align="center">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 dwcopytype="CopyTableRow">
<TBODY>
<tr>
<td width="25%" height=30><img src="images/info.gif" width="16" height="16"><a href="InfoInput.asp">录入学生信息</a></td>
<td width="25%" height=30 ><img src="images/info.gif" width="16" height="16"><a href="InfoQuery.asp">查询学生信息</a></td>
<td width="25%" height=30><img src="images/info.gif" width="16" height="16"><a href="InfoModifyDel.asp">修改/删除学生信息</a></td>
<td height=30 width="25%"> </td>
</tr>
</table>
<br>
<br>
<b><font size="5">修改/删除学生信息</font></b><br>
<br>
<br>
<br>
<%
If not isempty(Request("chkNum")) Then
strTemp = Request("chkNum")
if instr(strTemp,",")>0 then
dim ArrStudentNum
ArrStudentNum = split(strTemp,",")
dim id
For i = LBound(ArrStudentNum) To UBound(ArrStudentNum)
id=clng(ArrStudentNum(i))
call DelRecord(id)
next
else
call DelRecord(clng(strTemp))
end if
else
response.write "没有选中任何记录!"
End If
%>
<br>
<br>
<br>
<% if strSheetName<>"" then %>
<a href="<% =("InfoQuery2.asp?" & Session("strQureyString")) %>">【返回查询结果页面】</a>
<% end if %>
<br><br>
</TD>
</TR>
</TBODY>
</TABLE>
<!--#include file="CopyRight.asp"-->
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -