cursors

misuk11

Member
im using a cursor to retrieve a dataset into a TOraclewwDataset component. The procedure compiles ok and seems to run but no feilds are being returned. I have the TOraclewwDataset component linked to a datagrid but the grid shows no columns. Heres the procedure

PROCEDURE TEST(ARID OUT INTEGER, ARFORENAME OUT VARCHAR2, ARSURNAME OUT VARCHAR2)
IS
CURSOR c_artist IS SELECT ARTISTS_ID, FORENAME, SURNAME
FROM ARTISTS;
acur c_artist%ROWTYPE;
BEGIN
OPEN c_artist;
LOOP
FETCH c_artist INTO acur;
ARID := acur.artists_id;
ARFORENAME := acur.forename;
ARSURNAME := acur.surname;
EXIT WHEN c_artist%NOTFOUND;


END LOOP;
CLOSE c_artist;
END;

heres the sql in the TOraclewwDataset

BEGIN
C2_BILLING.TEST(:ARID,
:ARFORENAME,
:ARSURNAME);
END;

can anyone give me some pointers ?

tia
 
You will need to return a cursor instead of 3 cursor field values. For example:
Code:
PROCEDURE TEST(c_artist in out yourcursortype) IS
BEGIN
  OPEN c_artist for
    SELECT ARTISTS_ID, FORENAME, SURNAME
    FROM ARTISTS;
END;
See also your other post.
 
Back
Top