del.asp
来自「本程序采用ACC数据核心构件!! 功能介绍: 程序代码重新设计与优化」· ASP 代码 · 共 36 行
ASP
36 行
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/check.asp"-->
<%
SoftID=trim(request("SoftID"))
Action=Trim(Request("Action"))
tab=request("tab")
url=request("url")
if Action="" then
response.Write"<script>alert('参数不足!');</script>"
response.Write"<script>history.go(-1);</script>"
end if
if SoftID="" then
response.Write"<script>alert('请选择要操作的记录!');</script>"
response.Write"<script>history.go(-1);</script>"
end if
call DelSoft()
sub DelSoft()
if instr(SoftID,",")>0 then
SoftID=replace(SoftID," ","")
sqlDel="select * from "&tab&" where id in (" & SoftID & ")"
else
SoftID=Clng(SoftID)
sqlDel="select * from "&tab&" where id =" & SoftID
end if
Set rsDel= Server.CreateObject("ADODB.Recordset")
rsDel.open sqlDel,conn,1,3
do while not rsDel.eof
rsDel.delete
rsDel.movenext
loop
rsDel.close
set rsDel=nothing
response.Write"<script>alert('恭喜您!批量删除成功!');location.href='"&url&"';</script>"
end sub
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?