不能移动到最后一条记录吗??是不是sql语句有什么问题??

解决方案 »

  1.   

    第一次调用那个next()是把指标移动到第一行的(不能看字面)
      

  2.   

    贴你的全代码
    要不就是sql语言错了,ResultSet没有那么多行,你估计错了^_^
    要不就是你早到了ResultSet类的bug(这是发生几率超级少)
      

  3.   

    ResultSet的游标在开始时是位于第一条记录之前的,不是指向第一条的。
      

  4.   

    This is possible because the cursor can be moved before the first row at any time (with the method beforeFirst method (ResultSet interface)>beforeFirst). The cursor can begin another iteration through the result set with the method next. The following example positions the cursor before the first row and then iterates forward through the contents of the result set. The methods getString and getFloat retrieve the column values for each row until there are no more rows, at which time the method next returns the value false.
      

  5.   

    to :xiangbo520(燎原野火)  
    ResultSet的游标在开始时是位于第一条记录之前的,不是指向第一条的。
    ________________________________________
    第一次调用那个next()是把指标移动到第一行的(不能看字面)
    我说的是第一次调用next(),不是说开始,^_^,不要随便说^_^
      

  6.   

    开始该游标指向第一个结果元组的前一个,调用next()方法来向后移动游标
      

  7.   

    多些诸位老大指点,是我打印HTML时错了,少了个" 所以每个条件下都只有一条数据HOHO是HTML代码错了, 谢谢诸位,结贴了!
      

  8.   

    JAVA和ASP有点不一样,ASP中当您没有next时,记录集指针以经默认指向第一条记录上了,而JAVA的ResultSet Object在没有调用next()时,默认游标指针指在第一条记录的前面,也就是没有指向记录集,至于您所讲的没有指到最后一条记录上,是不存在的,while(Rs.next()){} 如果有记录,总会指向最后一条记录,然后停止的。
      

  9.   

    This is possible because the cursor can be moved before the first row at any time  //正解