Hannes Erven <hannes@erven.at> wrote:
> sometimes my application (jdbc-1101, hibernate, desktop application)
> reports the following "Statement has been closed" error:
> ... I'm wondering why there is even checkClosed() called before
> returning the value of a field?
> Could that check be safely removed?
Not according to the API documentation:
http://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html#getMaxRows%28%29
| Throws:
| SQLException - if a database access error occurs or this method is called on a closed Statement
Besides, if a Statement has been closed, why would you expect it to
still be usable?
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company