yahoo80
asked on
forms:Trigger bad bind variable
oracle 10g
Im trying to run a trigger in insert button in oracle forms. It did work in sql developer, but doesnt compile in forms builder
I get the message:
error 49 at line 4, column 6
bad bind variable 'customer.text_buyerid'
I compared names of customers tried to run it as :buyerid as well. Similar code works for other block so cant understand whats wrong...
Ive also tried to put the trigger in customer block in buyerid item, but no luck again...
I thought it might be different data format as in sql dev ive got customer as varchar2(6) and in forms char(7), but cant be bothered to upload 23k lines of data to change varchar to char
Im trying to run a trigger in insert button in oracle forms. It did work in sql developer, but doesnt compile in forms builder
I get the message:
error 49 at line 4, column 6
bad bind variable 'customer.text_buyerid'
I compared names of customers tried to run it as :buyerid as well. Similar code works for other block so cant understand whats wrong...
Ive also tried to put the trigger in customer block in buyerid item, but no luck again...
I thought it might be different data format as in sql dev ive got customer as varchar2(6) and in forms char(7), but cant be bothered to upload 23k lines of data to change varchar to char
trigger from forms button:
CLEAR_FORM;
:GLOBAL.mode := 'INSERT'; variable
SELECT chr(66)|| custseq.nextval
INTO :customer.text_Buyerid
FROM DUAL;
thats the same trigger but in customer block in buyerid item:
IF :SYSTEM.RECORD_STATUS = 'NEW' AND :buyerid IS Null THEN
SELECT chr(66)||custseq.NEXTVAL INTO :buyerid FROM DUAL;
END IF;
trigger from sql dev:
create or replace TRIGGER NEWCUSTOMER
BEFORE INSERT ON CUSTOMER
FOR EACH ROW
WHEN (new.BUYERID IS NULL)
BEGIN
SELECT chr(66)|| CUSTSEQ.NEXTVAL
INTO :new.buyerid
FROM dual;
END;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.