Re: "No results were returned by the query" exception

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: "No results were returned by the query" exception
Дата
Msg-id 027101c1d150$65024140$807ba8c0@inspiron
обсуждение исходный текст
Ответ на "No results were returned by the query" exception  ("David Hancock" <hancockd@cs.man.ac.uk>)
Ответы Re: "No results were returned by the query" exception  (tony <tony@animaproductions.com>)
Список pgsql-jdbc
Actually, this only occurs when there is an error in the query. If there
are no results from the query

Ie select * from foo; returns nothing then you will get an empty result
set

If on the other hand there is an error in the query like a transaction
is in error, then the exception will be thrown

Dave

> -----Original Message-----
> From: pgsql-jdbc-owner@postgresql.org
> [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of David Hancock
> Sent: Thursday, March 21, 2002 10:00 PM
> To: pgsql-jdbc@postgresql.org
> Subject: [JDBC] "No results were returned by the query" exception
>
>
> Hi,
>
> Someone recently pointed out that a SQLException is thrown
> when a query
> returns no results. I have noticed this too. It used to be
> the case (driver version 6.x) that an empty ResultSet was
> returned, and no
> exception thrown.
>
> This new behaviour means that the Postgres driver behaves
> significantly differently to other JDBC drivers, and that
> code written for a generic JDBC connection doesn't work as
> expected with Postgres.
>
> Is this new behaviour a bug or a feature ?
>
> regards,
>
> Dave Hancock.
>
>
>
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>


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

Предыдущее
От: "David Hancock"
Дата:
Сообщение: "No results were returned by the query" exception
Следующее
От: "Serguei Mokhov"
Дата:
Сообщение: Re: SQLException error code update?