Re: ECPG ERROR FOR "exec sql BEGIN" - Mailing list pgsql-interfaces

From Christof Petig
Subject Re: ECPG ERROR FOR "exec sql BEGIN"
Date
Msg-id 3C14AD94.45D9735F@petig-baender.de
Whole thread Raw
In response to ECPG ERROR FOR "exec sql BEGIN"  ("chengong@kobundo.ne.jp" <chengong@kobundo.ne.jp>)
Responses Re: ECPG ERROR FOR "exec sql BEGIN"  (Michael Meskes <meskes@postgresql.org>)
List pgsql-interfaces
Michael Meskes wrote:

> On Fri, Nov 30, 2001 at 09:59:28PM +0900, chengong@kobundo.ne.jp wrote:
> > I have used ECPG in my program.
> >
> > but run "exec sql BEGIN" after connect, have a error message like:
> >
> > "sql error BEGIN: already a transaction in progress"
>
> That means you run in auto-transaction mode which is the default. Please use
> "ecpg -t" to compile your program if you want to start the transactions
> yourself.
>
> The default is that there is always an open transaction.

IIRC an alternative is to issue 'exec sql set autocommit to on' after
connecting.
  Christof




pgsql-interfaces by date:

Previous
From: Tim Boring
Date:
Subject: Problem with libpq++
Next
From: "richard"
Date:
Subject: After Inserted, can't update the record