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 is the current version of JDBC? and explain its features?
What is the most common example type 1 driver?
What is two-phase commit in the database?
How does a file store compare with a jdbc store?
What is namedparameterjdbctemplate?
What are the Isolation level in JDBC transaction?
How warnings are retrieved in JDBC?
Explain the importance of drivermanager.
How can you make the connection using jdbc?
Why do we use jdbc in java?
What is jdbc and odbc in java?
can we define indexes on a foreign key? Explain pros and cons?