你可以测试一下第一次rs.next()返回什么值,rs当空值时。
解决方案 »
- 求助:JSP下载远程文件。
- 怎么配置tomcat数据源
- 关于jasperReport的问题
- struts2 token的问题
- java web 连接mysql数据库的问题!出现了Before start of result set
- 请教一个简单的问题。
- 急!解决送100分!请教关于使用JspSmartUpload上传百兆文件报错的问题
- 我的数据库里有很多记录,我想一次读出200条,然后分页,每页40条!如果用户读到第5页,我在从数据库里读出200条。用jsp应该怎么实现啊?
- 如何知道多个checkbox有哪些选中了?
- 请问如何在一个网页里完成对另一个网页的某些操作
- 关于日期的问题。。。。。
- strut
然后你再getString 这时候去那里GET哦,当然出错里
这里得到的RS要是空的话 可能就会报nullpointerException的
2 i++是什么?
* A <code>ResultSet</code> cursor is initially positioned
* before the first row; the first call to the method
* <code>next</code> makes the first row the current row; the
* second call makes the second row the current row, and so on.
*
* <P>If an input stream is open for the current row, a call
* to the method <code>next</code> will
* implicitly close it. A <code>ResultSet</code> object's
* warning chain is cleared when a new row is read.
*
* @return <code>true</code> if the new current row is valid;
* <code>false</code> if there are no more rows
* @exception SQLException if a database access error occursnext()的说明。
不是循环的问题。