Path: newssvr20.news.prodigy.com!newsmst01a.news.prodigy.com!prodigy.com!in.100proofnews.com!in.100proofnews.com!news2.telebyte.nl!surfnet.nl!transit.nntp.hccnet.nl!reader.nntp.hccnet.nl!not-for-mail
From: Sybrand Bakker <sybrandb@hccnet.nl>
Newsgroups: comp.databases.oracle.server
Subject: Re: ORACLE 9i , ERROR: PLS-00363 : expression 'SELF.ATTRIB_NUMBER' cannot be used as an assignment target
Date: Sat, 17 Apr 2004 10:22:54 +0200
Reply-To: sybrandb@hccnet.nl
Message-ID: <77q180h417kivnlpot0qais92vd374nink@4ax.com>
References: <cde37e04.0404161415.1fb2db87@posting.google.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 36
Organization: Hobby Computer Club News Network
NNTP-Posting-Date: 17 Apr 2004 08:22:56 GMT
NNTP-Posting-Host: 62.251.38.128
X-Trace: 1082190176 reader1.nntp.hccnet.nl 143 62.251.38.128
X-Complaints-To: abuse@hccnet.nl
Xref: newssvr20.news.prodigy.com comp.databases.oracle.server:259685

On 16 Apr 2004 15:15:47 -0700, victorveloso@email.com (Victor) wrote:

>Trying to compile an object in Oracle 9i.
>Why is this throwing an exception?
>Does anyone have a clue? Or all of you as puzzled as me? Any experts?
>
>Throws error:
>PLS-00363: expression 'SELF.ATTRIB_NUMBER' cannot be used as an assignment target
>
>==========
>CREATE OR REPLACE TYPE TEST_OBJECT AS OBJECT
>(
>  ATTRIB_NUMBER NUMBER,
>  MEMBER FUNCTION TEST_FUNCTION RETURN NUMBER
>)
>/
>CREATE OR REPLACE TYPE BODY TEST_OBJECT AS 
>  MEMBER FUNCTION TEST_FUNCTION RETURN NUMBER IS 
>  BEGIN
>     ATTRIB_NUMBER := ATTRIB_NUMBER + 1;
>     RETURN ATTRIB_NUMBER;
>  END; 
>END;
>/
>==========
>
>Any help would be greatly appreciated.


Instead of shouting, *read* the message in the error messages manual
and try to *understand* it: it tells you, you can't assign into that
variable.


--
Sybrand Bakker, Senior Oracle DBA
