Embedded SQL (II) - Mailing list pgsql-general

From Rosa.Carro@ii.uam.es
Subject Embedded SQL (II)
Date
Msg-id 3856765C.3C1BF30B@ii.uam.es
Whole thread Raw
In response to Urgent help: User variables  (Rosa.Carro@ii.uam.es)
List pgsql-general
Hello, colleages,

I have run a C program with embedded SQL, but the changes (insert sentences) don't keep data in the
database. When I connect to the database  by writting "psql database" and I do the selects, nothing
appears.

If I write the same SQL sentences in psql, the changes keep done.
I wasn't using transactions, but now I have included them, although the same thing happens again.

Any idea about this?
The code is:


EXEC SQL BEGIN DECLARE SECTION;
...
...
EXEC SQL END DECLARE SECTION;


EXEC SQL CONNECT TO db USER username;


EXEC SQL BEGIN TRANSACTION;

EXEC SQL INSERT INTO table (...) VALUES (...);
EXEC SQL INSERT INTO table (...) VALUES (...);
EXEC SQL INSERT INTO table (...) VALUES (...);
...
EXEC SQL COMMIT TRANSACTION;

EXEC SQL DISCONNECT;



------------------------------------------
Rosa Maria Carro Salas
E.T.S.Informatica
Universidad Autonoma de Madrid
Cantoblanco 28049, Madrid (Spain)
phone: +34 1 348 2291


pgsql-general by date:

Previous
From: Gerald Fiedler
Date:
Subject: Re: [GENERAL] Announce: Postgres Access Control Tool
Next
From: Lamar Owen
Date:
Subject: Re: With what options RPM was compiled? ( Was: Czech Win1250 sorting q)