What will happen when ResultSet is not closed?
Answer Posted / 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 |
Post New Answer View All Answers
What are the steps to connect to the database in java?
Which interface handles transaction management in jdbc?
What is odbc. how is it related to sql cli?
What is a jdbc url?
Explain the two tier and three tier architecture of jdbc.
How to check jdbc connection in java?
How can I use the JDBC API to access a desktop database like Microsoft Access over the network?
How data can be inserted into long row column of database?
What does executequery return in java?
Why is jdbc used?
What is jdbc class forname?
Name the new features added in jdbc 4.0.
What is setautocommit in jdbc?
Is jdbc database independent?
What does the jdbc resultsetmetadata interface?