Re: Statement.executeQuery() and no results

Поиск
Список
Период
Сортировка
Искать
От
Oliver Jowett
Тема
Re: Statement.executeQuery() and no results
Дата
Msg-id
20030723030133.GN31669@opencloud.com
Ответ на
Список
Дерево обсуждения
Statement.executeQuery() and no results Sailesh Krishnamurthy <sailesh@cs.berkeley.edu>
Re: Statement.executeQuery() and no results Oliver Jowett <oliver@opencloud.com>
Re: Statement.executeQuery() and no results Barry Lind <blind@xythos.com>
Re: Statement.executeQuery() and no results Kris Jurka <books@ejurka.com>
On Tue, Jul 22, 2003 at 07:48:49PM -0700, Sailesh Krishnamurthy wrote:
> 
> Folks
> 
> When we run a query that produces no results, executeQuery() returns
> an exception instead of a ResultSet object for which the first call to
> next() returns false. (This is with a driver for pgsql 7.3.2)

JDBC distinguishes between statements that return a (possibly empty)
ResultSet (e.g. any SELECT) that should use executeQuery() and statements
that return no ResultSet (e.g. INSERT or CREATE TABLE) that should use
executeUpdate().

The JDBC javadoc is a bit clearer than the driver's javadoc on this.

-O
В списке pgsql-jdbc по дате отправления
От: Kris Jurka
Дата:
Сообщение: Re: the IN clause saga
От: Barry Lind
Дата:
FAQ