I have been using view datasources to populate a grid and then i clicked on it to take me to a page that has header (Master) with a Detail. The detail is a grid of another table that i can add extra rows. When i do a docommit it says that it can not update the view datasource. Please let me know how i can use views and tables. Also on the view datasource you can click on the DML permissions the update delete and insert. Is that possible since its a view? Does it update directly the main table? |
This is the exact error i got Error while committing Datasource "PROJECTS_V1": ORA-01779: cannot modify a column which maps to a non key-preserved table Ahhh, it seems like your view is not updatable. Try issuing an update (or insert) statement to the view from SQL PLus. You'll get the same error. If you need that view to be updatable, you either need to change its query so that it becomes a key preserved view or write instead of triggers for the view.
(07 Feb '14, 02:32)
Yalim ♦♦
|
Hi Chris, A view can be updatable. Not every view is updatable. It depends on the query of the view. If Oracle can figure out the base table of the view, it will allow you to update the columns coming from the base table. There is a lot of information about updatable views on the internet. Here is a few I can suggest: http://docs.oracle.com/cd/E17952_01/refman-5.6-en/view-updatability.html http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5226026422731 http://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:548422757486 In Formspider, for a datasource definition to be updatable, you need to check one or more DML permission (as you've correctly noticed) and you need to specify a Primary Key. Moreover, if your view is updatable but it has non-updatable columns, in the data source definition dialog, go to the tab for each attribute that you do not want to include into an Update (and Insert) and uncheck the updatable checkbox. Kind Regards, |