I just read the ResultSet doc from
http://download.oracle.com/javase/1.4.2/docs/api/java/sql/ResultSet.html and
it has this statement:
A ResultSet object is automatically closed when the Statement object that
generated it is closed, re-executed, or used to retrieve the next result
from a sequence of multiple results.

It seems like it is not necessary to close the result set....

"hockchai Lim" <lim.hock-chai@xxxxxxxxxxxxxxx> wrote in message
news:mailman.6295.1283957519.2619.rpg400-l@xxxxxxxxxxxxxxx
I just did some studying on Scott Klement's JDBC_FreeResult export
procedure. In observing the code, it seems like this procedure not only
closes and frees the ResultSet, it also auto closes and frees the
PreparedStatement object that is associated to the ResultSet.

I've wrote a RPG program that needs to a same PreparedStatment object to
perform different queries using different parameter mark values. So, I
really do not want to free the PreparedStatement object when freeing the
ResultSet. Does anyone know of the best way to handle this?

Thanks




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.