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: Oracle cursors

Re: Oracle cursors

From: Lothar Armbrüster <lothar.armbruester_at_rheingau.netsurf.de>
Date: 1998/04/29
Message-ID: <1214.423T2136T13694711@rheingau.netsurf.de>#1/1

On 29-Apr-98 16:39:53 Ian Jennings wrote:

>Hi all,

Moin!

>Does anyone know how to get values *in* to an Oracle SP, please? I can
>get them out, no problem, but I need to pass in values (complete row at
>a time) and don't want to have to list 20 or 30 parameters.
 

>I realise that a Table-based record is needed but, from my
>understanding, on the Oracle side this can only be declared as 'REF
>CURSOR RETURN xxx%ROWTYPE'. This then won't let me access the record
>members in the SP.
 

>Any help will be *hugely* appreciated.

Just a guess, you could put your procedure into a package. There you can define some data types and use them as formal parameters. Like this:

create package your_package as

type your_rowtype is your_table%rowtype;

procedure your_proc(your_row in your_rowtype);

end your_package;

create package body your_packege as
...

I have not tested that and I'm writing the code out of memory, so your might have to correct the syntax slightly to make it work. (If it works this way at all ;-)
Just give it a try!

Hope that helps,
Lothar

--
Lothar Armbrüster       | lothar.armbruester_at_rheingau.netsurf.de
Schulstr. 12            | lothar.armbruester_at_t-online.de
D-65375 Oestrich-Winkel |
Received on Wed Apr 29 1998 - 00:00:00 CDT

Original text of this message

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