Problem with SQL, ResultSet in java
- by aphex
How can I iterate ResultSet ? I've tried with the following code, but i get the error java.sql.SQLException: Illegal operation on empty result set.
while ( !rs.isLast()) {
rs.next();
int id = rs.getInt("person_id");
SQL.getInstance().getSt().execute("INSERT ref_person_pub(person_id) VALUES(" + id + ")");
}