473,473 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

PL/SQL Object Question

Hi -

I've created the following SuperType object in Oracle :

CREATE OR REPLACE TYPE CT_CALC_UT as object (
ct_plant_nm varchar2(50),
ct_value number,
MEMBER function get_PlantNm return varchar2,
MEMBER procedure set_CT_Val(pi_ct_val in number)
) not final

and the following Type Body :

create or replace type body ct_calc_ut is

member function get_PlantNm return varchar2 is
v_plant_nm varchar2(50);
begin
v_plant_nm := self.ct_plant_nm;
return v_plant_nm;
end get_PlantNm;

member procedure set_ct_val(pi_ct_val in number) is
begin
ct_value := pi_ct_val;
end set_ct_val;

end;

Also, I've created the following subtype with it's own type body:

CREATE OR REPLACE TYPE CT_CALC_SP_UT UNDER CT_CALC_UT
(
Sed_Basins_in_service number(2),
Sed_Raw_flow_rate number(7,3),
Sed_flocc_free_cl number(7,3),
Sed_settled_free_cl number(7,3),
App_ph number(7,3),
Fltrs_free_cl number(7,3),
Fltrs_flow_rate number(7,3),
Fltrs_temp number(7,3),
Fltrs_ph number(7,3),
MEMBER function displayVals return varchar2
)

create or replace type body ct_calc_sp_ut is
member function displayVals return varchar2 is
....
...
...
...
...
v_ct_value := v_tot_LGiardia_Rmvl_Cred / v_log_giardia_removal_const

self.set_ct_val(v_ct_value); !!!! Error Message is Coming here !!!!!

....
....
end displayVals;

I keep getting an error message, Compilation errors for TYPE BOD
BMARINI.CT_CALC_SP_UT

Error: PLS-00363: expression 'SELF' cannot be used as an assignmen
target
Line: 138
Text: self.set_ct_val(v_ct_value);

Error: PL/SQL: Statement ignored
Line: 138
Text: self.set_ct_val(v_ct_value);

I'm not sure what is going on with this....I have seen plenty o
examples where an object type is being modified from within
procedure...and I'm prety stumped as to what is going on. If anyon
has any help...or ideas, please let me know.

Thanks

Jul 19 '05 #1
1 5294
daviscomp20 wrote:
Hi -

I've created the following SuperType object in Oracle :

CREATE OR REPLACE TYPE CT_CALC_UT as object (
ct_plant_nm varchar2(50),
ct_value number,
MEMBER function get_PlantNm return varchar2,
MEMBER procedure set_CT_Val(pi_ct_val in number)
) not final
and the following Type Body :

create or replace type body ct_calc_ut is

member function get_PlantNm return varchar2 is
v_plant_nm varchar2(50);
begin
v_plant_nm := self.ct_plant_nm;
return v_plant_nm;
end get_PlantNm;

member procedure set_ct_val(pi_ct_val in number) is
begin
ct_value := pi_ct_val;
end set_ct_val;

end;

Also, I've created the following subtype with it's own type body:

CREATE OR REPLACE TYPE CT_CALC_SP_UT UNDER CT_CALC_UT
(
Sed_Basins_in_service number(2),
Sed_Raw_flow_rate number(7,3),
Sed_flocc_free_cl number(7,3),
Sed_settled_free_cl number(7,3),
App_ph number(7,3),
Fltrs_free_cl number(7,3),
Fltrs_flow_rate number(7,3),
Fltrs_temp number(7,3),
Fltrs_ph number(7,3),
MEMBER function displayVals return varchar2
)

create or replace type body ct_calc_sp_ut is
member function displayVals return varchar2 is
...
..
..
..
..
v_ct_value := v_tot_LGiardia_Rmvl_Cred / v_log_giardia_removal_const;
self.set_ct_val(v_ct_value); !!!! Error Message is Coming here !!!!!!
...
...
end displayVals;

I keep getting an error message, Compilation errors for TYPE BODY
BMARINI.CT_CALC_SP_UT

Error: PLS-00363: expression 'SELF' cannot be used as an assignment
target
Line: 138
Text: self.set_ct_val(v_ct_value);

Error: PL/SQL: Statement ignored
Line: 138
Text: self.set_ct_val(v_ct_value);

I'm not sure what is going on with this....I have seen plenty of
examples where an object type is being modified from within a
procedure...and I'm prety stumped as to what is going on. If anyone
has any help...or ideas, please let me know.

Thanks.


This ng is dead - not all isp's carry it, regulars do not read it.
Repost in c.d.o.tools
--
Regards,
Frank van Bortel
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: sunaina | last post by:
This is the first program I am writing using PHP and Mysql. I am creating a game where user thinks of an object and my program guesses the object while asking series of yes/no questions. All a...
6
by: Chris S. | last post by:
I'm trying to make a graphical editor and browser for Pickled files. One aspect I'm not sure about is how to detect multiple references to the same data. For instance, say I had the Pickled...
4
by: Tom | last post by:
I want to open a recordset object on an .asp page. When I open the recordset I would like to use a stored procedure that expects a parameter to be passed for the stored procedure. I will then use...
4
by: Mark D. Anderson | last post by:
About a month ago Richard Cornford did an interesting analysis of a memory leak in jscript (internet explorer) when there are "circular" references between DOM objects and (real) jscript objects:...
6
by: Luke | last post by:
Here is my emails to Danny Goodman (but probably he is very busy so he didn't answered it). First email(simple): Subject: JavaScript Arrays " We all know the array can act like HashMap, but is...
100
by: E. Robert Tisdale | last post by:
What is an object? Where did this term come from? Does it have any relation to the objects in "object oriented programming"?
6
by: Tom | last post by:
I have a problem, to which I have been unable to find a solution for days now, after checking numerous references (both in books and online). Perhaps someone here can help. Here's my problem: ...
7
by: Martin Robins | last post by:
I am currently looking to be able to read information from Active Directory into a data warehouse using a C# solution. I have been able to access the active directory, and I have been able to return...
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
15
by: Hamed | last post by:
Have I posted the message to wrong newsgroup? Or Does the question is so much strage? Would someone please kindly direct me to a true newsgroup or resource? Best Regards Hamed
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.