Re: "No results were returned by the query" exception - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: "No results were returned by the query" exception
Date
Msg-id 027101c1d150$65024140$807ba8c0@inspiron
Whole thread Raw
In response to "No results were returned by the query" exception  ("David Hancock" <hancockd@cs.man.ac.uk>)
Responses Re: "No results were returned by the query" exception
List 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 by date:

Previous
From: "David Hancock"
Date:
Subject: "No results were returned by the query" exception
Next
From: "Serguei Mokhov"
Date:
Subject: Re: SQLException error code update?