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

From Barry Lind
Subject Re: "No Results were returned by the query" exception
Date
Msg-id 3D003512.7060607@xythos.com
Whole thread Raw
In response to Re: "No Results were returned by the query" exception  ("Joe Shevland" <jshevland@j-elite.com>)
Responses Re: "No Results were returned by the query" exception
List pgsql-jdbc
Jon,

Jon Swinth wrote:
 > The code actually calls a select
> from currval() first and then on exception calls nextval() to see what the sequence is currently at.

The description here sounds like you are doing something you cannot do
in Postgres.  If you get an exception/error in postgres you cannot just
catch the exception and continue processing.  Any error in postgres will
abort the transaction, you must first do an explicit rollback() before
you can continue issuing additional sql statements.  So when you say
'and then on excpetion calls ...' it sounds to me like you are trapping
an exception and trying to do additional work.

thanks,
--Barry


pgsql-jdbc by date:

Previous
From: Barry Lind
Date:
Subject: Re: Problem with java.sql.DatabaseMetaData
Next
From: "Shmuel A. Kahn"
Date:
Subject: Re: Newbie question - Applet works only in appletviewer