Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] Java Transaction

From: Peter T Mount <pgint(at)maidast(dot)demon(dot)co(dot)uk>
To: Anil Amarakoon <anil(at)server(dot)awcoldstream(dot)com>
Cc: "pgsql-interfaces(at)postgreSQL(dot)org" <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: [INTERFACES] Java Transaction
Date: 1998-05-07 05:51:25
Message-ID: Pine.LNX.3.95.980507065024.3542B-100000@retep.org.uk (view raw or flat)
Thread:
Lists: pgsql-interfaces
On Wed, 6 May 1998, Anil Amarakoon wrote:

> Hi All!
> 
> How do I do transaction in Java
> when I tried
> resultset=statement.executeQuery("begin transaction);
> resultset.close();
> resultset = statement .executeQuery("select foo from bar where
> myid=1000");
> 
> it does not return any results.
> 
> or do I have to do with
> connection.setAutoCommit(false);
> bla bla...
> myconn.commit();
> 
> any information in this regard is highly appreciated.

The JDBC way is using AutoCommit, and the first way may fail in 6.4

-- 
Peter T Mount peter(at)retep(dot)org(dot)uk or petermount(at)earthling(dot)net
Main Homepage: http://www.retep.org.uk
************ Someday I may rebuild this signature completely ;-) ************
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter(at)maidstone(dot)gov(dot)uk


In response to

pgsql-interfaces by date

Next:From: Peter T MountDate: 1998-05-07 05:54:43
Subject: Re: [INTERFACES] JDBC driver and postgreSQL
Previous:From: Anil AmarakoonDate: 1998-05-07 04:49:38
Subject: Java Transaction

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group