1,首先要明确删除哪条记录
无非还就是SQL语句了,比如对应到特定的某ID上。
id = request.form("id")
sql = "Select * from cnarticle where cn_id="&id
Set rs = Server.CreateObject ("ADODB.Recordset")
rs.Open sql,conn,2,3
2,很简单的一条语句:删除
rs.delete
3,最好能在修改之前征求确认删除
<script language="JavaScript">
<!--
function suredo(src,q)
{
var ret;
ret = confirm(q);
if(ret!=false)window.location=src;
}
//-->
</script>
<a href='javascript:suredo("del.asp?id=<%=id%>","确定删除?")'>Delete</a>
最直接的一条语句
sql = "delete * from cnarticle where cn_id="&id
conn.Execute(sql)
[Edit on 2004-12-27 0:25:36 By cnbruce]