java.sql.SQLException:after end of result set;
网上找了半天都没找出原因。
大家看看我的代码 就知道我错在哪里了。我找到错误后,简直发疯。。
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root");
Statement sta = con.createStatement();
ResultSet rs = sta.executeQuery("select * from books ");
while(rs.next());
{
BookBean book = new BookBean();
book.setId(rs.getInt(1));
book.setBookname(rs.getString(2));
book.setPrice(rs.getInt(3));
book.setPublisher(rs.getString(4));
al.add(book);
}