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 advantages of database connection pooling?
Does sql allow null values ?
How data can be inserted into long row column of database?
Is jdbctemplate thread safe?
what happen if we set JDBC string to NULL?
Give a way to check that all result sets have bin accessed and update counts are generated by execute method.
How can I know when I reach the last record in a table, since JDBC doesn't provide an EOF method?
What is difference between jdbc and odbc?
Is jdbc faster than hibernate?
What are the advantages of collection pools?
Differentiate between type_scroll_insensitive and type_scroll_sensitive.
Is jdbc a protocol?
What is jdbc connection interface?
How does jdbc work?
How do I find jdbc version?