| Author |
closing connection and statement
|
eswar kumar
Ranch Hand
Joined: Oct 20, 2002
Posts: 98
|
|
|
what will happen if i closed a connection without closing a statement?will it affect next time when i am retriving data from data base ?
|
 |
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
|
|
|
Closing a connection will close the statement, since the statement depends on it. It's good practice to explicitly close the statement though.
|
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
|
 |
Dana Hanna
Ranch Hand
Joined: Feb 28, 2003
Posts: 227
|
|
|
It is expecially good practice when using connection pooling (calling connection.close() doesn't really close the connection). You can't be sure that the connection pool implementer is keeping track of your statements and closing them for you.
|
 |
 |
|
|
subject: closing connection and statement
|
|
|