What will happen when ResultSet is not closed?
Answer / sekhar reddy
It also depends on the JDBC driver and it would also not happen if it is a pooled connection. A pooled connection is returned to the pool and would only actually be closed later when its lifetime has expired. In the meanwhile easily more than thousands statements and/or resultsets might have been opened and left unclosed.
However that presumes
- That the driver does do that.
- That the connection close actually cleans the resources.
There was an Oracle driver that did not do the second.
Is This Answer Correct ? | 0 Yes | 3 No |
What are the 4 types of jdbc drivers?
What is ojdbc?
How can we maintain the integrity of a database by using jdbc?
Differentiate between stored procedure and functions?
How MS-Access DB can be accessed over a network, using JDBC API?
How to get the data from a table into a buffer?
how we can remove hard code in java?
What is jdbc template?
what are the advantages of JDBC?
What are the considerations for deciding on transaction boundaries?
What is meant by jdbc and odbc?
Where jdbc drivermanager class is used?