删除:
set rs=...
......
keyfiled="李斌" '据实际设置
sql1="delete from [father] where fathername='" & keyfiled &"'"
sql2="delete from [chile] where fathername='"&keyfiled&'"
rs.open sql1,conn,1,3
rs.open sql2,conn,1,3作者: Kdsffsd 时间: 2010-1-15 03:11
能更详细一些吗?老师!谢谢!作者: ︶ぺ雨湮ㄣ 时间: 2010-1-15 03:11
这不够详细吗?
用keyfiled接收你上页传递来的参数,选建RECORDSET记录集,
或者:
keyfiled=request("fathername")
sql1="delete from [father] where fathername='" & keyfiled &"'"
sql2="delete from [chile] where fathername='"&keyfiled&'"
conn.execute(sql1)
conn.execute(sql2)作者: 水清苓 时间: 2010-1-15 03:11
下面是我的代码,只修改到第一个表(Father表)请问怎么修改才能实现我题目的要求,谢谢先!
<%if Request.QueryString("nono")="yesyes" then
FatherID=request("FatherID")
FatherName=request("FatherName")
If FatherName="" Then
response.write "<div align='center'><br><br><br><br><br><br></div>"
response.write "<div align='center'>父亲姓名不能为空<br><br><br></div>"
response.write ("<div align='right'><a href='javascript:history.back( )'><<<我忘了</a></div>")
response.end
end if
BigClassName=replace(trim(Request("BigClassName")),"'","")
BigClassName_en=replace(trim(Request("BigClassName_en")),"'","")
set rs=server.createobject("adodb.recordset")
sql="select * from Father where FatherID="&FatherID
rs.open sql,conn,1,3
rs("FatherName")=FatherName
rs.update
rs.close
response.redirect "Father.asp"
end if
%>
<%
FatherID=request.querystring("FatherID")
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From Father where FatherID="&FatherID, conn,3,3
%>作者: cs牛人 时间: 2010-1-15 03:11
试以下
<%if Request.QueryString("nono")="yesyes" then
FatherID=request("FatherID")
FatherName=request("FatherName")
If FatherName="" Then
response.write "<div align='center'><br><br><br><br><br><br></div>"
response.write "<div align='center'>父亲姓名不能为空<br><br><br></div>"
response.write ("<div align='right'><a href='javascript:history.back( )'><<<我忘了</a></div>")
response.end
end if
BigClassName=replace(trim(Request("BigClassName")),"'","")
BigClassName_en=replace(trim(Request("BigClassName_en")),"'","")
set rs=server.createobject("adodb.recordset")
sql1="select * from [father] where fathername='" & FatherName &"'"
sql2="select * from [chile] where fathername='"&FatherNam&'"
rs.open sql,conn,1,3
rs("FatherName")=FatherName
rs.update
rs.close
response.redirect "Father.asp"
end if
%>
<%
FatherID=request.querystring("FatherID")
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From Father where FatherID="&FatherID, conn,3,3
%>作者: 清风 时间: 2010-1-15 03:11
这样不行呀!作者: ajytdjt 时间: 2010-1-15 03:11
因为还没执行这两句,