[求助]关于写入数据库的问题??急
<%set rs=server.CreateObject("adodb.recordset")sql="select * from data where bianhao="&trim(request.Form("bianhao"))&"" 'biaohao数据类型为int
rs.open sql,conn,1,3
if not rs.eof then
response.write("<SCRIPT language=JavaScript>alert('编号已存在,请重新输入');history.back();</SCRIPT>")
response.end
else
rs.addnew
rs("bianhao")=request.Form("bianhao")
rs("cname")=request.Form("cname")
rs("sex")=request.Form("sex")
rs.update
response.write("<SCRIPT language=JavaScript>alert('添加成功');history.back();</SCRIPT>")
response.end
end if
rs.close
set rs=nothing
%>
为什么总是不能够写进数据库 但是能够弹出"添加成功"这个窗口