Bulk Delete Data Method one
Id=request.form ("checkbox")
Id=split (ID, ",")
Shu=0
For i=0 to UBound (ID)
Sql= "SELECT * from Jiang_fname where id=" &id (i)
Set Rs=conn.execute (SQL)
If not rs.eof then
Delete_file (RS ("fname"))
End If
Rs.close
Set rs=nothing
Sql= "Delete from Jiang_fname where id=" &id (i)
Conn.execute SQL,SHU1
Shu=shu+1
Next
If Shu>0 Then
Response.Write ("<script>alert (' delete success '); location.href= '" &url& "';</script>")
Else
Response.Write ("<script>alert delete failed"); Web effects: History.back ();</script> ")
End If
Conn.close
Set conn=nothing
Method two uses SQL in
<%
Arrdel=request ("id")
' Response.Write Arrdel
Sql= "Delete from news where id" ("&arrdel&")
' Response.Write sql
Conn.execute SQL
Set conn=nothing
Response.Write "<script Language=javascript>alert (' Delete success! ');"
Response.Write "Javascript:history.go ( -1) </script>"
Response.End
%>
The above two batch deletion instance code, utilizes in the benefit is higher, also is simpler, uses the traversal feeling code to be some more.