提妲和阿加特:asp 数据库更新问题

来源:百度文库 编辑:高考问答 时间:2024/04/29 22:09:56
说明:我在前面的代码中已经得到count变量的数据。count用来记录表中符合条件的数据条数的。如count=5.
那么在下面代码我想更新对应表中的一项数据。其中一共是有5条数据要更新的。因为count为5.但不知为什么出来的结果
只更新了4条数据。其中第一条数据没有更新。(数组array_id(count)中也是有5个数的了)
<%
set rs=Server.Createobject("ADODB.Recordset")
rs.open "select * from work where work_id="&CInt(work_id),conn,1,3
DO WHILE NOT rs.EOF
rs("my_workid")=array_id(count)
count=count-1
if rs.eof then exit do

rs.update
rs.movenext
loop
rs.close
%>

我的帐号已经没什么分了.谢谢帮忙.

asp数组下标是从0开始的
当count=5,array_id(count)是空值
也就不会更新数据了