Returning data from an Oravle sys_refcursor

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for Oracle in Delphi and C++Builder
Post Reply
fabnav

Returning data from an Oravle sys_refcursor

Post by fabnav » Mon 06 Feb 2006 20:52

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

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Tue 07 Feb 2006 14:12

You can receive result set using TSQLStoredProc component. Please assign
SQLStoredProc1.StoredProcName:='m_hcscurproc';

Guest

Post by Guest » Tue 07 Feb 2006 19:52

Do I have to pass the cursor to the stored procedure as a parameter?

Regards,

Bill

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Wed 08 Feb 2006 10:26

No. You have to set SQLStoredProc1.StoredProcName and Connection.

Post Reply