DECLARING & OPENING SURSORS

Поиск
Список
Период
Сортировка
От Atif Jung
Тема DECLARING & OPENING SURSORS
Дата
Msg-id AANLkTilXgQoRj6nCVdO7yVkeJ1mYyKu5UilpHAFR_Fdl@mail.gmail.com
обсуждение исходный текст
Список pgsql-novice
In ECPG I've declared a cursor using the following code:
 
1294       EXEC SQL DECLARE t_cursor CURSOR WITH HOLD FOR SELECT col1 INTO :h_col1 :h_col1_ind FROM table1;
1295       EXEC SQL WHENEVER SQLERROR STOP;
 
However when I OPEN the cursor using:
 
1296       EXEC SQL OPEN t_cursor;
 
I get an error stating :
 
current transaction is aborted, commands ignored until end of transaction block on line 1296
 
According to the manual there seems to be nothing wrong with the OPEN command. This is a bound cursor and for the life of me I can't see the problem.
 
Thanks

Atif


В списке pgsql-novice по дате отправления:

Предыдущее
От: Atif Jung
Дата:
Сообщение: sqlca structure
Следующее
От: Tom Lane
Дата:
Сообщение: Re: DROPPING INDEX error