Change the block source dynamically

To discuss Oracle Forms & Reports related technical issues.
Post Reply
fahedakhter
Posts: 7
Joined: Tue Apr 18, 2006 4:58 am
Location: Pakistan

Change the block source dynamically

Post by fahedakhter »

I have a block name "EMP" & "EMP2". I want to change the property of block emp QUERY_DATA_SOURCE_NAME to "EMP2" I write a trigger on When-New-Form-Instance.

Set_Block_Property('Emp',Query_Data_Source_Name,'Emp2');
Set_Block_Property('Emp',Query_Allowed,4);
Set_Block_Property('Emp',Update_Allowed,4);
Clear_Block(No_Validate);
Execute_Query(No_Validate);

It work fine and data is populated. But when I change any record it give me an error.
FRM-40654: Record has been updated by another user. Re-query to see change.

When I omit Set_Block_Property('Emp',Query_Data_Source_Name,'Emp2'); then
it work fine. Remember there is no lock in any table.

Regard's
Fahed Akhter
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests