<% dim BigClassID,sql bigclasstable=trim(Request("bigclasstable")) SmallClasstable=trim(Request("SmallClasstable")) infotable=trim(Request("infotable")) BigClassID=trim(Request("BigClassID")) if BigClassID<>"" then set rs=server.CreateObject("adodb.recordset") sql="select * from "&SmallClasstable&" where BigClassName='"&BigClassID&"'" rs.open sql,conn,1,1 if rs.eof then sql="delete from "&bigclasstable&" where BigClassID=" & cint(BigClassID) conn.Execute sql sql="delete from "&infotable&" where BigClassName='" & BigClassID & "'" conn.Execute sql Response.Redirect "allClassManage.asp?bigclasstable="&bigclasstable&"&SmallClasstable="&SmallClasstable else response.write("") end if end if call CloseConn() %>