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:
:GLOBAL.mode := 'INSERT'; variable
SELECT chr(66)|| custseq.nextval
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;
trigger from sql dev:
create or replace TRIGGER NEWCUSTOMER
BEFORE INSERT ON CUSTOMER
FOR EACH ROW
WHEN (new.BUYERID IS NULL)
SELECT chr(66)|| CUSTSEQ.NEXTVAL