请问是哪里出错了吗
这个东东,,,哪里有那么复杂,
要用ResultSet ,,请先这样;
while(rs.next()){
...
...
}
* @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 occurs or this method is
* called on a closed result set
*/
boolean next() throws SQLException;
看上面你这个直返回了一行哈, 错误说的是结果集没有当前行。
看你代码,你是rs.getString(1); 应该是这里错了,你换成rs.getString(0);
你确定不应该是rs.getString(0)吗,你表里一共就一行,集合都是从0开始的,你去获取第1行,那不是空吗