Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> PLS-00049:bad bind variable
I seem to have got myself into a bit of a pickle with this one.
After creating the 'THIS_IS_MY_MAP' table as user THIS_IS_ME I have
then attempted to create
and compile the THIS_IS_MY_INS_SEQ trigger to insert a new ID number
into THIS_IS_MY_MAP.IMG_ID
before each row is inserted into the THIS_IS_MY_MAP table.
CREATE OR REPLACE TRIGGER THIS_IS_MY_INS_SEQ BEFORE INSERT
ON THIS_IS_MY_MAP FOR EACH ROW BEGIN SELECT THIS_IS_MY_SEQ.NEXTVAL INTO :NEW.THIS_IS_MY_MAP.IMG_ID FROM DUAL;
However, when I attempt to compile the trigger I get the following error message:
PLS-00049: bad bind variable 'NEW.THIS_IS_MY_MAP'
Removing the colon then gives me this error message:
PLS-00201: identifier 'NEW.THIS_IS_MY_MAP' must be declared
After searching the web I concluded that this is a privilege issue and
simply granted all on
THIS_IS_MY_MAP to THIS_IS_ME although I am still puzzled as to why I
need to do this if I created
all the objects THIS_IS_MY_MAP, THIS_IS_MY_SEQ and THIS_IS_MY_INS_SEQ.
In any case I am still getting the same error messages!
Thanks in advance,
tb31 Received on Tue May 29 2007 - 04:28:49 CDT