"No results" exception on executeQuery()

From: "chris markiewicz" <cmarkiew(at)commnav(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: "No results" exception on executeQuery()
Date: 2001-08-16 16:47:10
Message-ID: 009a01c12673$182161e0$77b846c6@cmarkiewicz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello. I just update my driver to the latest version (7.1-1.3). I am
seeing MANY of the following exception:

No results were returned by the query.
at org.postgresql.jdbc2.Statement.executeQuery(Statement.java:63)
at
com.commnav.sbh.framework.persist.JDBCEngine.executeQuery(JDBCEngine.java:22
1)
at
com.commnav.sbh.framework.persist.PersistenceObject.query(PersistenceObject.
java:1046)
...

I checked the history of this listserv and found some related but not quite
relevant stuff (part of the thread is below - it talks about using
executeUpdate for update/insert/delete)...

I am sometimes getting this exception even when there should be results
returned...

I appreciate any help.
chris

-----Original Message-----
From: pgsql-jdbc-owner(at)postgresql(dot)org
[mailto:pgsql-jdbc-owner(at)postgresql(dot)org]On Behalf Of
Brian_Williams(at)i2(dot)com
Sent: Tuesday, May 08, 2001 2:50 PM
To: pgsql-jdbc(at)postgresql(dot)org
Subject: [JDBC] "No results" exception on insert

Hello,

I have some code which is essentially doing the following:

Statement stmt;
ResultSet rs = stmt.executeQuery("insert into users values ( 'joe', 'blow'
)");

The values are inserted into the table correctly. I verified this using
psql:
"select * from users".

The problem is that the executeQuery throws an Exception. The message
is "No results were returned by the query":

No results were returned by the query.
at org.postgresql.jdbc2.Statement.executeQuery(Statement.java,
Compiled
Code)

My driver is "org.postgresql.Driver" from the jar file jdbc7.0-1.2.jar. I
think
the port version is 7.1 The platform is FreeBSD 4.2-RELEASE.
I am using linux jdk 1.2.2.

Can anyone give me any ideas?

Thanks,
Brian

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message chris markiewicz 2001-08-16 17:40:47 ERROR: SET TRANSACTION ISOLATION LEVEL must be called before any query
Previous Message Ben Carterette 2001-08-16 15:02:27 Re: select on multiple tables