ASp只能修改第一条记录
<%a=Trim(Request.Form("bookname"))b=Trim(Request.Form("booktype"))c=Trim(Request.Form...
<%
a=Trim(Request.Form("bookname"))
b=Trim(Request.Form("booktype"))
c=Trim(Request.Form("bookmoney"))
d=Trim(Request.Form("num"))
e=Trim(Request.Form("publishing"))
f=Trim(Request.Form("publishing"))
set conn=server.CreateObject("adodb.connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="&server.mappath("123.mdb")
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from tushuxinxi where id like '"&a&"'",conn,1,3
rs("bookname")=a
rs("booktype")=b
rs("bookmoney")=c
rs("num")=d
rs("publishing")=e
rs("publishing")=f
rs.update
%> 展开
a=Trim(Request.Form("bookname"))
b=Trim(Request.Form("booktype"))
c=Trim(Request.Form("bookmoney"))
d=Trim(Request.Form("num"))
e=Trim(Request.Form("publishing"))
f=Trim(Request.Form("publishing"))
set conn=server.CreateObject("adodb.connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="&server.mappath("123.mdb")
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from tushuxinxi where id like '"&a&"'",conn,1,3
rs("bookname")=a
rs("booktype")=b
rs("bookmoney")=c
rs("num")=d
rs("publishing")=e
rs("publishing")=f
rs.update
%> 展开
2个回答
展开全部
你当然只能修改一条记录啊,你要循环获取,并修改才可以!
更多追问追答
追问
帮我修改行不
追答
rs.open "select * from tushuxinxi where id like '"&a&"'",conn,1,3
while not rs.eof
rs("bookname")=a
rs("booktype")=b
rs("bookmoney")=c
rs("num")=d
rs("publishing")=e
rs("publishing")=f
rs.update
rs.movenext
wend
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询