第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

請(qǐng)問(wèn)想做一個(gè)報(bào)表的添加功能,在添加的時(shí)候需要查詢報(bào)表的編號(hào)是否重復(fù)?如何實(shí)現(xiàn)?

請(qǐng)問(wèn)想做一個(gè)報(bào)表的添加功能,在添加的時(shí)候需要查詢報(bào)表的編號(hào)是否重復(fù)?如何實(shí)現(xiàn)?

紅糖糍粑 2022-04-08 11:07:22
我想做一個(gè)報(bào)表的添加功能,在添加的時(shí)候需要查詢報(bào)表的編號(hào)是否重復(fù),如果重復(fù)就不執(zhí)行添加,彈出提示窗口,我的程序如下:dim biaohao1biaohao1=trim(request("biaohao"))//biaohao是文本框的nameset rs=server.createobject("adodb.recordset")sql="select * from yuanliao_in_store"rs.open sql,conn,1,3我想在這個(gè)地方添加一個(gè)FOR語(yǔ)句,可是就是不成功,語(yǔ)句如下for i=1 to rs.recordcountif rs.eof then exit forif(biaohao1=(response.write(rs("biaohao"))){alert("編號(hào)重復(fù)!");return (false);}nextrs.close希望高手速度解圍,小弟謝謝了!急。rs.addnewrs("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") = jingbanrenrs("jieshengyuan") = trim(request.Form("jieshengyuan"))rs("content") = trim(request.Form("content"))rs.updateresponse.Write "<script language=javascript>alert('錄入成功!');</script>"response.write "<meta http-equiv=""refresh"" content=""0;url=yuanliao_in_store.asp"">"response.endrs.closeset rs=nothingend sub
查看完整描述

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


查看完整回答
反對(duì) 回復(fù) 2022-04-11
  • 1 回答
  • 0 關(guān)注
  • 174 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)