1 回答

TA貢獻(xiàn)1826條經(jīng)驗(yàn) 獲得超6個(gè)贊
sql="select * from yuanliao_in_store"
rs.open sql,conn,1,3
我想在這個(gè)地方添加一個(gè)FOR語(yǔ)句,可是就是不成功,語(yǔ)句如下
for i=1 to rs.recordcount
if rs.eof then exit for
if(biaohao1=(response.write(rs("biaohao")))
{
alert("編號(hào)重復(fù)!");
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('編號(hào)重復(fù)');</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
添加回答
舉報(bào)