1 回答
TA贡献1826条经验 获得超6个赞
sql="select * from yuanliao_in_store"
rs.open sql,conn,1,3
我想在这个地方添加一个FOR语句,可是就是不成功,语句如下
for i=1 to rs.recordcount
if rs.eof then exit for
if(biaohao1=(response.write(rs("biaohao")))
{
alert("编号重复!");
return (false);
}
next
这里改成这样 :
sql="select * from yuanliao_in_store where biaohao="&biaohao1
rs.open sql,conn,1,3
if not rs.eof then
rs.close
response.Write "<script language=javascript>alert('编号重复');</script>"
else
rs.addnew
rs("chushengdi") = trim(request.Form("chushengdi"))
rs("jiesheng") = trim(request.Form("jiesheng"))
rs("bianhao") = trim(request.Form("bianhao1"))
rs("jigou") = trim(request.Form("jigou"))
rs("uptime") = request.Form("uptime")
rs("jingbanren") = jingbanren
rs("jieshengyuan") = trim(request.Form("jieshengyuan"))
rs("content") = trim(request.Form("content"))
rs.update
response.Write "<script language=javascript>alert('录入成功!');</script>"
rs.close
set rs=nothing
response.end
response.write "<meta http-equiv=""refresh"" content=""0;url=yuanliao_in_store.asp"">"
end if
end sub
添加回答
举报