Re: ECPG ERROR FOR "exec sql BEGIN"

From: Christof Petig <christof(at)petig-baender(dot)de>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: "chengong(at)kobundo(dot)ne(dot)jp" <chengong(at)kobundo(dot)ne(dot)jp>, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: ECPG ERROR FOR "exec sql BEGIN"
Date: 2001-12-10 12:41:56
Message-ID: 3C14AD94.45D9735F@petig-baender.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Michael Meskes wrote:

> On Fri, Nov 30, 2001 at 09:59:28PM +0900, chengong(at)kobundo(dot)ne(dot)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

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message richard 2001-12-11 07:03:10 After Inserted, can't update the record
Previous Message Tim Boring 2001-12-10 03:56:31 Problem with libpq++