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: Ref Cursors in 8i

Re: Ref Cursors in 8i

From: Jusung Yang <JusungYang_at_yahoo.com>
Date: 11 Jun 2003 21:20:38 -0700
Message-ID: <130ba93a.0306112020.7353038@posting.google.com>


mhaggerty_at_mbda.gov (Michael Haggerty) wrote in message news:<a83d9e3a.0306111305.7928f716_at_posting.google.com>...
> Maybe I'm just having a bad day, but I am having a lot of trouble with
> reference cursors in 8i.
>
> What I want to do is this:
>
> PROCEDURE list_feeds(return_data IN OUT the_data) IS
> BEGIN
> OPEN return_data FOR
> SELECT dm.din_name, df.feed_name
> FROM DIN_MASTER dm, DIN_FEEDS df
> WHERE dm.din_id = df.din_id;
> END list_feeds;
>
> But all I can get to work is this:
>
> PROCEDURE list_feeds(return_data IN OUT the_data) IS
> BEGIN
> OPEN return_data FOR
> SELECT * FROM DIN_MASTER;
> END list_feeds;
>
> These procedures appear in a package, and I know there is another way
> to write them. Can someone point me at how to do this?
>
> M

Since the 2 procedures return different type of records, "the_data" needs to be weakly typed. In this case, you don't really need to declare your own refcursor, just use the SYS_REFCURSOR. If you are already using weakly typed refcursor, then the problem is probably not refcursor at all.... Post the errors, like Sybrand said.

Received on Wed Jun 11 2003 - 23:20:38 CDT

Original text of this message

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