asp中的rs.addnew不起作用 忙帮看看
ifrequest("acction")="add"thensetrs=server.createobject("adodb.recordset")sql="select...
if request("acction")="add" then
set rs=server.createobject("adodb.recordset")
sql="select * from zbry where zbry='"&zbry&"'"
rs.open sql,conn,3,3
if (rs.eof and rs.bof) then
rs.addnew
rs("zbry") = zbry
rs("dwmc") = dwmc
rs("zbdw") = replace(Replace(Replace(zbdw,"'",""),"or","")," ","")
rs.update
rs.close
set rs=nothing
else
response.write"<script language=javascript>alert('对不起,人员已存在!');"
response.write"javascript:history.go(-1)</script>"
response.end
end if
end if
response.redirect "admin_zbry.asp"
response.End() 展开
set rs=server.createobject("adodb.recordset")
sql="select * from zbry where zbry='"&zbry&"'"
rs.open sql,conn,3,3
if (rs.eof and rs.bof) then
rs.addnew
rs("zbry") = zbry
rs("dwmc") = dwmc
rs("zbdw") = replace(Replace(Replace(zbdw,"'",""),"or","")," ","")
rs.update
rs.close
set rs=nothing
else
response.write"<script language=javascript>alert('对不起,人员已存在!');"
response.write"javascript:history.go(-1)</script>"
response.end
end if
end if
response.redirect "admin_zbry.asp"
response.End() 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询