Has anyone been able to do this? I have been reading oracle documentation,
ADO documentation, newsgroups, websites... everything looking for a
practical example of this in Delphi using ADO.  So far I have learned that a
REF CURSOR is required to return a result set from a stored procedure.
Second, I have learned that the stored procedure returning the REF CURSOR
must not be in a package body (according to Oracle docs.)

To return all the columns and rows from a table named PROP, I have a simple
package that defines a REF CURSOR type:

    CREATE OR REPLACE package cur_pkg as
        type RefCur is ref cursor RETURN Scott.Prop%ROWTYPE;
    END cur_pkg;

and a stored procedure:

    create or replace procedure get_props(cur_var in out cur_pkg.RefCur) as
         open cur_var for select * from scott.prop;

I am using a TADOStoredProc component to connect to Oracle 8.1.6 using the
Oracle OLEDB provider From NT Wkst 4.0 SP6. I am using the connection string
property of the StoredProc component and not an ADOConection component.

I am able to select the stored proc from the list of available procedures in
the IDE. Upon inspection of the parameters, cur_var has been added to the
parameter list as ftInterface/pdInputOutput. Additionally, one in/out
parameter of type string is defined for each column in my PROP table. These
in fact match the definition of the columns. Obviously, Delphi/ADO/Oracle
are working together enough to know something about the transfer that needs
to take place.

When I attempt to set the Active property of the StoredProc to true, Oracle
reports an error stating that the wrong number/types of parameters have been

I have tried everything I can think of to make this work to no avail.

Has anyone been able to assemble the pieces of this puzzle? Any further
insight would certainly be appreciated.


John M Evans