Embedded SQL (II)

Поиск
Список
Период
Сортировка
От Rosa.Carro@ii.uam.es
Тема Embedded SQL (II)
Дата
Msg-id 3856765C.3C1BF30B@ii.uam.es
обсуждение исходный текст
Ответ на Urgent help: User variables  (Rosa.Carro@ii.uam.es)
Список 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 по дате отправления:

Предыдущее
От: Gerald Fiedler
Дата:
Сообщение: Re: [GENERAL] Announce: Postgres Access Control Tool
Следующее
От: Lamar Owen
Дата:
Сообщение: Re: With what options RPM was compiled? ( Was: Czech Win1250 sorting q)