Page 1 of 1

Returning data from an Oravle sys_refcursor

Posted: Mon 06 Feb 2006 20:52
by fabnav
Hi,

I'm using dbExpress and I have created the following procedure in Oracle:

create or replace
procedure m_hcscurproc (p_cur out sys_refcursor)
IS
begin
open p_cur for
select orgid from organization;
end;

How do I write my SQL code to get the returned data?

Regards,

Bill

Posted: Tue 07 Feb 2006 14:12
by Paul
You can receive result set using TSQLStoredProc component. Please assign
SQLStoredProc1.StoredProcName:='m_hcscurproc';

Posted: Tue 07 Feb 2006 19:52
by Guest
Do I have to pass the cursor to the stored procedure as a parameter?

Regards,

Bill

Posted: Wed 08 Feb 2006 10:26
by Paul
No. You have to set SQLStoredProc1.StoredProcName and Connection.