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 ?
Joined: Nov 06, 2000
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
Joined: Feb 28, 2003
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.