Terry Dykstra
Member²
I have the following code (stripped down) in a before update trigger. The cursor finds 4 records. The moment I try to step into a line where I try to get a value from the first row of t_invoices(i) (i=1), PLSQLDeveloper just hangs. Anybody seen this? I'm using 7.1.5.1397.
DECLARE
li_invoicecnt number(6);
ls_cc varchar2(12);
...
TYPE invoicearray IS TABLE OF PFAPINVOICE_D%ROWTYPE;
t_invoices invoicearray;
CURSOR cur_coding IS
SELECT * FROM PFAPINVOICE_D
WHERE ...;
BEGIN
....
OPEN cur_coding;
FETCH cur_coding BULK COLLECT INTO t_invoices;
li_invoicecnt := t_invoices.COUNT; /* count=4 */
FOR i IN 1..li_invoicecnt
LOOP
BEGIN
ls_cc := t_invoices(i).sub_acc; /* hangs here */
....
END;
END LOOP;
CLOSE cur_coding;
DECLARE
li_invoicecnt number(6);
ls_cc varchar2(12);
...
TYPE invoicearray IS TABLE OF PFAPINVOICE_D%ROWTYPE;
t_invoices invoicearray;
CURSOR cur_coding IS
SELECT * FROM PFAPINVOICE_D
WHERE ...;
BEGIN
....
OPEN cur_coding;
FETCH cur_coding BULK COLLECT INTO t_invoices;
li_invoicecnt := t_invoices.COUNT; /* count=4 */
FOR i IN 1..li_invoicecnt
LOOP
BEGIN
ls_cc := t_invoices(i).sub_acc; /* hangs here */
....
END;
END LOOP;
CLOSE cur_coding;