Reputation: 89
from clause query i put a query to get data from two tables check that code
select empno,ename,job,mgr,hiredate,sal,comm,deptno,grade gr
from emp
left outer join salgrade on ( emp.sal between losal and hisal)
i also change the properties to be visible and not visible like that code
if get_item_property('text_item17', visible) = 'TRUE' then
set_item_property('text_item17', visible, property_false);
else
set_item_property('text_item17', visible, property_true);
set_item_property('text_item17',enabled,property_true);
set_item_property('text_item17',enabled,property_true);
set_item_property('text_item17',NAVIGABLE ,property_true);
set_item_property('text_item17',UPDATE_ALLOWED,property_true);
set_item_property('text_item17',QUERYABLE,property_true);
set_item_property('text_item17',UPDATE_NULL,property_true);
end if;
when i run the form i am getting that error that i can't update the data
Upvotes: 3
Views: 718
Reputation: 89
from dml data target type choose table and put table name then go to the item text_item17 properties change query only to yes
Upvotes: 0
Reputation: 143083
Forms doesn't know which table those columns belong to, so it can't perform update.
I suggest you create a view, base data block on that view, create an INSTEAD OF
trigger which could take care about correct inserting, updating and deleting rows from both tables.
SET_ITEM_PROPERTY
calls you posted don't have anything to do with it (i.e. won't solve your problem).
[EDIT]
Saying that you'd want to solve it without a view, I'd suggest you not to spend too much time on that. If you open Online Forms Help and search for "Guidelines for choosing block data sources", you'll see that FROM clause, as a data source, allows query, but does NOT allow DML (inserts, updates and deletes).
Upvotes: 2