Guest_imported
New member
- Jan 1, 1970
- 0
I'm extracting multiple rows using a cursor and would like to display the results in a multi-record block (tabular) on a form. My code below will extract all the rows into the cursor, but the loop displays every row one at a time only on the first row in the multi-record block. This is done so fast that I only see the last row retrieved.
DECLARE
CURSOR MYCUR IS SELECT EID,ENAME,EADDRESS FROM EMPLOYEE;
BEGIN
OPEN MYCUR;
LOOP
FETCH MYCUR INTO :TEST.EID, :TEST.ENAME, :TEST.EADDRESS;
EXIT WHEN MYCUR%NOTFOUND;
END LOOP;
CLOSE MYCUR;
END;
DECLARE
CURSOR MYCUR IS SELECT EID,ENAME,EADDRESS FROM EMPLOYEE;
BEGIN
OPEN MYCUR;
LOOP
FETCH MYCUR INTO :TEST.EID, :TEST.ENAME, :TEST.EADDRESS;
EXIT WHEN MYCUR%NOTFOUND;
END LOOP;
CLOSE MYCUR;
END;