Embedded SQL (II)

From: Rosa(dot)Carro(at)ii(dot)uam(dot)es
To: pgsql-general(at)postgresql(dot)org, pgsql-novice(at)hub(dot)org
Subject: Embedded SQL (II)
Date: 1999-12-14 16:54:52
Message-ID: 3856765C.3C1BF30B@ii.uam.es
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message The Hermit Hacker 1999-12-14 16:55:46 Re: [GENERAL] pg_psort files
Previous Message Gerald Fiedler 1999-12-14 16:42:11 Re: [GENERAL] Announce: Postgres Access Control Tool