Re: Statement.executeQuery() and no results

From: Kris Jurka <books(at)ejurka(dot)com>
To: Sailesh Krishnamurthy <sailesh(at)cs(dot)berkeley(dot)edu>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Statement.executeQuery() and no results
Date: 2003-07-23 02:55:07
Message-ID: Pine.LNX.4.33.0307222253260.6056-100000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On 22 Jul 2003, 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)
>

This code will throw an exception if you try calling executeQuery with a
non-select statement. For example an UPDATE. If you are getting
unexpected exceptions please post a test case here.

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2003-07-23 02:59:49 Re: the IN clause saga
Previous Message Sailesh Krishnamurthy 2003-07-23 02:48:49 Statement.executeQuery() and no results