Postgres Exception : No results were returned by the query.

Viewed 29205

I am trying to insert some rows in to a table... I am using postgressql-7.2.jar.

I get the following exception

org.postgresql.util.PSQLException: No results were returned by the query.
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:255)

I have already Googled and the possible reasons suggested are

  1. Use executeUpdate() method or execute() method instead of executeQuery() method.

  2. This could possibly be because of jar problem; try other versions of postgres jars.

  3. In some places they save it could be because of heap space error.

I have tried all the three solutions but none of them work...

I am not pasting the code since I have just used statement.executeUpdate(queryString). The insert statements load the data in to the table but still I get this error.

Can some one help me out in this?

3 Answers
Related