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

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL Package Level Subtype Problem

Re: PL/SQL Package Level Subtype Problem

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 17 May 2006 00:07:38 +0200
Message-ID: <38jk62llfgquommsncae9vfcdqtkvshfdv@4ax.com>


On 16 May 2006 10:11:23 -0700, rajbrown_at_gmail.com wrote:

>Hi, I'm having problems writing a value to a field of a variable which
>is declared as a table subtype. I have a package which declares the
>subtype (in the spec) as follows:
>
>SUBTYPE rec_info IS info%ROWTYPE;
>
>Within the body I declare a variable of type rec_info. I have two
>procedures, one which inputs a variable of the same subtype which then
>gets copied off to a local variable in the package. In the second
>procedure, I want to overwrite some of the fields in the variable with
>values into that procedure:
>
>
>lr_info rec_info;
>
>PROCEDURE p_save (pr_info IN rec_info) IS
>BEGIN
> lr_info := pr_info;
>END;
>
>PROCEDURE p_save (pv_text IN VARCHAR2) IS
>BEGIN
> lr_info.text := rtrim(pv_text);
>END;
>
>
>The first p_save procedure saves the record locally ok and I can see
>values in it when I debug. However the second p_save does not overwrite
>the value in lr_info.text and when I debug it shows me the previous
>value already stored via pr_info. Hard coding a string to overwrite
>lr_info.text does not work either.
>
>If anyone can suggest what I can do I'd be very grateful!
>
>Thanks.

did you try to pass lr_info as an IN OUT parameter to the 2nd proc. It must be some scoping problem.

--
Sybrand Bakker, Senior Oracle DBA
Received on Tue May 16 2006 - 17:07:38 CDT

Original text of this message

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