Re: [NOVICE] DB insert Error

From: "Jasbinder Bali" <jsbali(at)gmail(dot)com>
To: "Michael Fuhr" <mike(at)fuhr(dot)org>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] DB insert Error
Date: 2006-08-16 15:40:40
Message-ID: a47902760608160840l2effd646s96f5c0676feca0a1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

I did commit the transaction by writing
EXEC SQL COMMIT; right after the insert statement.
Then also its not inserting the record and says:
[2998]: ECPGexecute line 97 Ok: INSERT 0 1
and SQLCODE is still 0

~Jas

On 8/16/06, Michael Fuhr <mike(at)fuhr(dot)org> wrote:
>
> On Wed, Aug 16, 2006 at 01:46:30AM -0400, Jasbinder Bali wrote:
> > I changed the datatype from varchar[] to varchar
> > ECPGdebug(1,stderr) says
> > [2998]: ECPGexecute line 97 Ok: INSERT 0 1
> >
> > Its not inserting any record even though sqlcode is 0.
>
> Are you committing the transaction? See the bottom of the
> following page:
>
> http://www.postgresql.org/docs/8.1/interactive/ecpg-commands.html
>
> "In the default mode, statements are committed only when EXEC SQL
> COMMIT is issued."
>
> --
> Michael Fuhr
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Harpreet Dhaliwal 2006-08-16 15:55:39 Triggers invoking a stored procedure or a C function
Previous Message Matteo Bertini 2006-08-16 15:23:16 hint unique result fro union

Browse pgsql-novice by date

  From Date Subject
Next Message Jasbinder Bali 2006-08-16 16:00:55 Re: [NOVICE] DB insert Error
Previous Message Tom Lane 2006-08-16 15:37:26 Re: libpq Describe Extension [WAS: Bytea and perl]