/** * @see org.apache.derby.iapi.sql.ResultSet#cleanUp * @exception StandardException Thrown on error */ public void cleanUp() throws StandardException { if (rowHolder != null) { rowHolder.close(); } if (rs != null) { try { rs.close(); } catch (Throwable t) { throw StandardException.unexpectedUserException(t); } rs = null; } // Close the ps if it needs to be instantiated on each execution if (!vtiRS.isReuseablePs() && ps != null) { try { ps.close(); ps = null; } catch (Throwable t) { throw StandardException.unexpectedUserException(t); } } super.cleanUp(); } // end of cleanUp
public void finish() throws StandardException { if ((ps != null) && !vtiRS.isReuseablePs()) { try { ps.close(); ps = null; } catch (Throwable t) { throw StandardException.unexpectedUserException(t); } } super.finish(); } // end of finish