Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: In TOAD, how do I display refcursor results returned by an Oracle Store Procedure
"Eric Patrick" <epatrick_at_quandis.com> wrote in message
news:3c42f1ed.0409160927.25593c58_at_posting.google.com...
> I am using TOAD, and I have a simple Oracle SP that returns a cursor:
>
> CREATE OR REPLACE PROCEDURE pObjectTypeList (
> iObject nvarchar2,
> oResult OUT Types.RefCursor
> )
> AS
>
> BEGIN
> OPEN oResult FOR
> SELECT
> *
> FROM ObjectType
> WHERE
> UPPER(ObjectType.Object) = UPPER(iObject)
> END;
>
> I can execute it successfully in TOAD as follows:
>
> DECLARE
> IOBJECT nvarchar2(200);
> ISORTBY nvarchar2(200);
> ORESULT Types.RefCursor;
>
> BEGIN
> IOBJECT := 'LedgerTemplateItem';
> ISORTBY := 'LedgerTemplateItem';
> LOAN_MOD.POBJECTTYPELIST ( IOBJECT, ISORTBY, ORESULT );
> COMMIT;
> END;
>
> However, I cannot figure out how to display the contents of ORESULT in
> TOAD. (The result set works beautifully in .NET using
> System.Data.Oracle components.)
>
> Eric
>
I have tried a line after the commit statement with dbms_output.put_line (
ORESULT); ?
Received on Thu Sep 16 2004 - 14:42:34 CDT