Closing a statement
Closing a statement
От:
Kim Ho <kho@redhat.com>
Дата:
After running the JDBC Compatibility Test Suite, I've found that statements aren't actually closed when you use stmt.close(). If you try to execute a closed statement, it _should_ throw an SQLException, but doesn't. Besides the freeing of resources (which is already handled in close() but m_binds[] should probably be freed as well), certain operations should be disallowed. I was thinking of all set/get/execute operations. Any suggestions/comments? Cheers, Kim
Re: Closing a statement
От:
Barry Lind <blind@xythos.com>
Дата:
Kim, Yes I agree. In the resultset code we are a little better at this, but the statement code is lacking these checks, and they should be there. --Barry Kim Ho wrote: > After running the JDBC Compatibility Test Suite, I've found that > statements aren't actually closed when you use stmt.close(). If you try > to execute a closed statement, it _should_ throw an SQLException, but > doesn't. > > Besides the freeing of resources (which is already handled in close() > but m_binds[] should probably be freed as well), certain operations > should be disallowed. > > I was thinking of all set/get/execute operations. > > Any suggestions/comments? > > Cheers, > > Kim > > > ---------------------------(end of broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings >