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: Ian Jennings <ij_at_microware.demon.co.uk>
Date: Thu, 30 Apr 1998 07:47:13 +0100
Message-ID: <35481E6F.968CCC90@microware.demon.co.uk>

Lothar Armbrüster wrote:

> 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
>

Hi Lothar,

Thanks. Yes I've tried that. I am trying to interface to Delphi and it needs the table-based record to be declared as a 'RETURN foo%ROWTYPE' (or so it would seem). It handles Cursor-based records ok but it's not keen on Table-based. Consequently, it doesn't like the 'IN' bit.

Thanks again.

> --
> Lothar Armbrüster | lothar.armbruester_at_rheingau.netsurf.de
> Schulstr. 12 | lothar.armbruester_at_t-online.de
> D-65375 Oestrich-Winkel |

--



Ian Jennings
Microware Data Services

This post is made entirely from recycled ones and noughts


Received on Thu Apr 30 1998 - 01:47:13 CDT

Original text of this message

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