AResultSet
object is automatically closed when theStatement
object that generated it is closed, re-executed, or used to retrieve the next result from a sequence of multiple results.
--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/c7a5d306-78f1-4969-b3eb-002adda2f535%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
try (Connection connection = CommonTools.connectToDatasource();
PreparedStatement statement = connection.prepareStatement("SELECT * FROM myschema.myfunction(?, ?, ?)");) {
statement.setInt(1, siteId);
statement.setDate(2, scheduleDate);
statement.setInt(3, 4
ResultSet resultSet = statement.executeQuery();
while (resultSet.next()) {
...
}
...
resultSet.close();
} catch (Exception e) {
...
}
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/047634ff-0a21-44c7-8dd7-eafbb4798078%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.