Cursor variable cannot be nil !

Im trying to retrieve a recordset from a stored procedure and have created the procedure below. What is the correct way to call this from a TOracleDataset SQL EDITOR in the component at Delphi ?
this is the SQL

BEGIN
alex.f_obtem_parcela(:cr);
END;

i have declared cursor variable in edit variables

I get an error 'Cursor :rc cannot be nil'
What is happening?

PROCEDURE alex.f_obtem_parcela(P_CR OUT SYS_REFCURSOR )
IS
BEGIN
OPEN p_recordset FOR
SELECT * FROM PARCELAS

END;
 
In the SQL Editor you cannot execute this, since it does not implicitly assign a TOracleQuery instance to the :cr variable. You can still open the dataset at design-time though.
 
Back
Top