What will happen when ResultSet is not closed?



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

Post New Answer

More JDBC Interview Questions

How to set NULL values in JDBC PreparedStatement?

0 Answers  


What is jdbc architecture in java?

0 Answers  


What is statement and resultset in jdbc?

0 Answers  


write down exceptions those appear in java programs when u write JDBC Programs?

2 Answers  


What is the advantage of namedparameterjdbctemplate?

0 Answers  






What are the differences between setmaxrows(int) and setfetchsize(int)?

0 Answers  


What is jdbc odbc bridge?

0 Answers  


What is jndi lookup?

0 Answers  


How warnings are retrieved in JDBC?

1 Answers  


What are the Isolation level in JDBC transaction?

1 Answers  


What is odbc and jdbc?

0 Answers  


Difference between JDBC and Hibernate? Give one sample based on the variance?

4 Answers   HCL, IBM, Xybion,


Categories