"No results" exception on insert - Mailing list pgsql-jdbc

From Brian_Williams@i2.com
Subject "No results" exception on insert
Date
Msg-id OFEEA0FFB3.58799563-ON88256A46.0065CD14@i2.com
Whole thread Raw
Responses Re: "No results" exception on insert  ("Mike D'Agosta" <mdagosta@tolosatech.com>)
"No results" exception on executeQuery()  ("chris markiewicz" <cmarkiew@commnav.com>)
List pgsql-jdbc
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



pgsql-jdbc by date:

Previous
From: "Thys De Wet@iCommerce"
Date:
Subject: JDBC Download.
Next
From: Bruce Momjian
Date:
Subject: Re: Why?? executeQuery() & exception: "No results were returned by the query."