Reputation: 33
I have a Form, and I create a trigger pre-insert in the data block
select Investor_Seq.nextval into :INVESTOR.INVESTOR_NUMBER from dual;
all the data is valid, I only use two trigger, PRE-INSERT AND WHEN BUTTON IS PRESS
press save button:
FRM-40508 Unable to insert the record
i am using the save button the trigger WHEN BUTTON IS PRESS:
commit_FORM;
it seem the PRE-INSERT statment error? but the new Investor number is show up on the text item.
ORA-01400: cannot insert NULL into ("ORCL5_10"."INVESTOR"."INVESTOR_NUMBER")
SQL statment ERROR
INSERT INTO INVESTOR (FIRST_NAME,LAST_NAME,STREET_ADDRESS,CITY,PROVINCE,POSTAL_CODE,
AREA_CODE,PHONE_NUMBER,EMAIL_ADDRESS,ACCOUNT_NUMBER)
VALUES (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10)
Upvotes: 0
Views: 9675
Reputation: 143083
If you check the column list of the INSERT
statement, you'll see that investor_number
isn't among those columns.
It means that - although PRE-INSERT
trigger fetched the next sequence value into a field on the screen, it is not part of that table. I guess that its database column property isn't correctly set, i.e. that form field doesn't belong to the investor
table.
Should be easy to fix; inspect :investor.investor_number
field's property palette and map it to the table column.
Upvotes: 2