日期:2014-05-17  浏览次数:20799 次

记录集读取数据库内容出错,请大家帮忙看看~!在线等~!
我现在有一个页面,提交的时候将一组名为mycheck的类型为checkbox的value值传递到另一页面,在接收的页面中用数组myarray=split(mycheck, ",   ",-1,1)分隔mycheck中的值,然后用
  for   each   x   in   myarray
      rs.Open   "select   *   from   book   where   book_id= "&x& " ",conn,1,3
      response.write   rs.fields( "book_name ")
  next
为啥读出来的值总是数据库中第一个符合x的值呢?          
我觉得是记录集的问题,可是如果是的话,要怎么改呢?

------解决方案--------------------
for each x in myarray
rs.Open "select * from book where book_id= "&x& " ",conn,1,3
response.write rs.fields( "book_name ")
rs.close
set conn=nothing
next