Re: Commitment control on updateable ResultSet - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: Commitment control on updateable ResultSet
Date
Msg-id 491f66a50901020419r68ca8f0cycc000c98c8e6cc94@mail.gmail.com
Whole thread Raw
In response to Commitment control on updateable ResultSet  (Flavio Palumbo <flavio.palumbo@fastwebnet.it>)
List pgsql-jdbc
One of the statements between setAutoCommit(false) and execute query is generating an error.

Dave

On Fri, Jan 2, 2009 at 6:47 AM, Flavio Palumbo <flavio.palumbo@fastwebnet.it> wrote:
Hi all,

I try to control the commitment on an updatable ResultSet but I get a strange ex
ception :
"ERROR: current transaction is aborted, commands ignored until end of transactio
n block"

I do this :
- Connection.setAutoCommit(false);
- Connection.setSavepoint(point);
- Connection.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, java.sq
l.ResultSet.CONCUR_UPDATABLE);
- Statetement.executeQuery("SELECT T1.*  FROM  public.teststrike T1 for update")

at this point a I get the above exception.

Can somebody help me to figure out why this happens ?

Thanks
Flavio


--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

pgsql-jdbc by date:

Previous
From: Flavio Palumbo
Date:
Subject: Commitment control on updateable ResultSet
Next
From: Flavio Palumbo
Date:
Subject: R: Re: Commitment control on updateable ResultSet