Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: In TOAD, how do I display refcursor results returned by an Oracle Store Procedure

Re: In TOAD, how do I display refcursor results returned by an Oracle Store Procedure

From: paddy_nyr <mpprpp_at_yahoo.com>
Date: Thu, 16 Sep 2004 15:42:34 -0400
Message-ID: <2qu8f4F14cv2sU1@uni-berlin.de>

"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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US