我对这段代码有疑问:
ResultSet dane = statement.executeQuery("SELECT * FROM ProWarns WHERE blahblah = '" + cel + "'");
while (dane.next()) {
// some code (only get some string from result)
if (TimeEnd <= EndTime) {
statement.executeUpdate(
"DELETE FROM ProWarns WHERE id = '" + id + "'"); //and error
statement.executeUpdate(
"UPDATE ProWarnsPlayers SET num = '" + NewV + "'" WHERE Pl = '"+ tar + "'");
}
}
错误:java.sql.SQLException:ResultSet 关闭后不允许操作。错误在哪里,我该如何解决?
PS:
我包括我的 DB 类的Pastebin ,以防它有帮助。