Re: executeQuery() throws "Statement has been closed"

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: executeQuery() throws "Statement has been closed"
Дата
Msg-id 1406818366.83671.YahooMailNeo@web122301.mail.ne1.yahoo.com
обсуждение исходный текст
Ответ на executeQuery() throws "Statement has been closed"  (Hannes Erven <hannes@erven.at>)
Список pgsql-jdbc
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


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: executeQuery() throws "Statement has been closed"
Следующее
От: Hannes Erven
Дата:
Сообщение: Re: executeQuery() throws "Statement has been closed"