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 |
How can a java objects be stored in database?
What are the different types of locking in JDBC?
The new features of the JDBC 2.0 API, will be supported for JDBC-ODBC Bridge?
What is a JDBC 2.0 DataSource?
Briefly tell about the jdbc architecture.
How to check jdbc connection in java?
When you will get error like ?No suitable driver??
Does the JDBC-ODBC Bridge support multiple concurrent open statements per connection?
What is preparedstatement in jdbc?
What is connection pooling and why it is used?
what is rowset?
Without using of Class.forName(? ?), how do you connect to db?