Java Tengo una excepcion java.sql.SQLException: ResultSet close con el siguiente codigo:
public String getString(String table, String column, int id) {
String string = "Error";
try {
Statement stmt = dbConnection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT " + column + " FROM " + table + " where id = " + id);
string = rs.getString(column);
rs.close();
} catch (SQLException ex) {
Logger.getLogger(DbTask.class.getName()).log(Level.SEVERE, null, ex);
}
return string;
}
