[EMAIL PROTECTED] wrote:
Amir Michail wrote:
Hi,
Is there any point in calling the close method on ResultSet and the
close method of PreparedStatement?
Amir
You might later change the database to one where it matters much more.
Mark Thornton
Huh?
I'm sorry but your answer doesn't make any sense.
To answer Amir's question... you close the ResultSet and the
PreparedStatements to remove any overhead as a result of their
instantiation.
The resources required by an open ResultSet depend on the implementation
of the database and drivers. It is fairly low for embedded Derby but
considerably higher for some other databases. If there is a chance that
the database used may be replaced by something else (Oracle, SQL Server,
etc), then being careful about closing objects like ResultSet can be
more important.
I agree that the overhead of PreparedStatement's is usually not great.
Mark Thornton