Re: next() and PreparedStatement

From: Jens Carlberg <jenca(at)lysator(dot)liu(dot)se>
To: "'Mano lito'" <mdelas(at)msn(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: next() and PreparedStatement
Date: 2001-08-28 20:36:32
Message-ID: 3B8C00D0.BCD5E0B9@lysator.liu.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

> i believe that when you close the stmt, the rs is automatically
> closed. you have to leave the stmt open until you're done with the
> rs.

Exactly. If you read the Java documentation for interface
java.sql.Statement, method close(), it tells you the Resultset, if any,
also is closed on that call. PreparedStatement extends Statement,
CallableStatement extends PreparedStatement.

It's important to notice that the Postgres implementation of Resultset
et al is meant to work as described in the standard Java documentation;
that's the whole point of the interfaces. Thus a lot of these questions
can be answered by carefully reading through the standard Java
documentation.

Yours,
///Jens Carlberg

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Ricardo Pardini 2001-08-28 20:46:05 JDBC version
Previous Message Barry Lind 2001-08-28 19:59:57 Re: Proposal to fix Statement.executeBatch()