Обсуждение: DECLARING & OPENING SURSORS

Поиск
Список
Период
Сортировка

DECLARING & OPENING SURSORS

От
Atif Jung
Дата:
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