Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL Package Level Subtype Problem
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. Received on Tue May 16 2006 - 12:11:23 CDT