This content has been marked as final. Show 8 replies
The error has nothing to do with your trigger. When you base a block on a table (a so called database block) and you insert data there, forms will automatically create the needed INSERT-statement when you a COMMIT_FORM. In your case, something went wrong with this. Go to the menu Help->Show errors there you will find the reason for the error.
The INSERT-statement in your trigger can be deleted.
btw... If you have to do an INSERT, you should always give the list of column-names in the INSERT
Hi the detail error is:
INSERT INTO ORDER_LINE_LIST(INV_ID,ITEM_DESC,INV_SIZE,COLOR,INV_PRICE,OK_QUANTITY,O_ID)
ORA-01779:cannot modify a column which maps to a non key-preserved table.
BTW the data block was created based on a view.
Edited by: 791401 on 28/08/2010 22:40
Edited by: 791401 on 28/08/2010 22:45
Since your block is based on a View, you cannot Insert, Update or Delete records directly as you do in blocks based on table.
You need to use the ON-INSERT, ON-UPDATE, ON-DELETE, and ON-LOCK triggers for inserting, updating and deleting records.
For instance in the ON-INSERT trigger you can use the INSERT statements to insert record in the order_master (check the table name) and order_line table.
Hope this helps.
You need to use the ON-INSERT, ON-UPDATE, ON-DELETE, and ON-LOCK triggers for inserting, updating and deleting records.Not neccecarily:
- You could set the "DML data target Name" to the undrlying table of the view, where you want to apply the DML to
- You could create INSTEAD-OF-triggers on the view and do the logic there.