Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Problems with assigning values to variables in objects PLS-00363
What's going on!
I keep getting this error: PLS-00363: expression 'SELF.ERRNO' cannot
be used as an assignment target(see below).
I looked at oracle website and it seems ok to assign values to an object's variables
I have this object in Oracle 8i:
CREATE OR REPLACE TYPE TErrorMgr AUTHID CURRENT_USER AS OBJECT (
ErrNo Number, MSG VARCHAR2(600), HlpID VARCHAR2(10), ErrType VARCHAR2(100),
And a table of this object: create table TErrors of TErrorMgr;
And a Body:
CREATE OR REPLACE TYPE BODY TErrorMgr AS
MEMBER FUNCTION RaiseError(pErrNo NUMBER) RETURN TErrorMgr IS
vErr TErrorMgr;
vNo Number;
BEGIN
SELECT VALUE(p) INTO vErr FROM TERRORS p
WHERE p.ErrNo = pErrNo;
RETURN vErr;
EXCEPTION WHEN OTHERS THEN
ErrNo := SQLCODE;
ERRMsg := SQLERRM(SQLCODE);
vErr := TErrorMgr(ErrNo, ErrMsg, NULL, 'ORA-' );
RETURN vErr;
END RaiseError;
...
...
END;
I get error PLS-00363 On ErrNo := SQLCODE and on ERRMsg :=
SQLERRM(SQLCODE);
Why??. Thanks
Received on Thu Feb 21 2002 - 01:02:02 CST