ASP页面如何批量修改数据?
A页面剖分内容:<%StrBooking="Select*FromBookingorderbyIDdesc"SetrsBooking=Conn.Execute(StrBo...
A页面剖分内容:
<%
StrBooking = "Select * From Booking order by ID desc"
Set rsBooking = Conn.Execute(StrBooking)
Do While Not rsBooking.EOF
%>
<INPUT value="<% Response.Write rsBooking("Shipping_Order") %>" name="so<%=rsBooking("id")%>">
<input name="id" type="hidden" value="<%=rsBooking("id")%>">
<%
rsBooking.MoveNext
Loop
%>
B页面剖分内容:
id=Request.form("id")
nid=split(id,",")
for i = 0 to ubound(nid)
Set rs = server.CreateObject("ADODB.Recordset")
rs.open "select Shipping_Order from Booking where id = "&nid(i)&"",conn,1,3
rs("Shipping_Order") = Request.form("SO"&nid(i))
rs.Update
rs.Close
set rs = nothing
Next
上面是我的两个ASP页面的代码,不知为什么只能更新第一条的内容,其它
全部不能更新入数据库,我用的是ACCESS,请高手帮帮忙,上面的代码错在
哪,为什么不能全部更新. 展开
<%
StrBooking = "Select * From Booking order by ID desc"
Set rsBooking = Conn.Execute(StrBooking)
Do While Not rsBooking.EOF
%>
<INPUT value="<% Response.Write rsBooking("Shipping_Order") %>" name="so<%=rsBooking("id")%>">
<input name="id" type="hidden" value="<%=rsBooking("id")%>">
<%
rsBooking.MoveNext
Loop
%>
B页面剖分内容:
id=Request.form("id")
nid=split(id,",")
for i = 0 to ubound(nid)
Set rs = server.CreateObject("ADODB.Recordset")
rs.open "select Shipping_Order from Booking where id = "&nid(i)&"",conn,1,3
rs("Shipping_Order") = Request.form("SO"&nid(i))
rs.Update
rs.Close
set rs = nothing
Next
上面是我的两个ASP页面的代码,不知为什么只能更新第一条的内容,其它
全部不能更新入数据库,我用的是ACCESS,请高手帮帮忙,上面的代码错在
哪,为什么不能全部更新. 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询