Incorrect Where Clause being set internally for a Master-Detail block
I got a strange error the other day. I have 2 sets of database blocks in a form and the blocks are based on views and tables. So, lets say Block B1 is based on View1 and Block B2 is based on View2. Block B1 and Block B2 are also in a Master Detail relationship. So, Block B1 is the Master and Block B2 is the Child.
There is another a master detail in the form and Block B3 is based on View 3 and Block B4 is based on View 4.
So, our error routine captures the last query that was run by doing a :SYSTEM.LAST_QUERY. What was interesting was that a user got Error FRM-40505 which basically means "ORACLE error: unable to perform query".
Looking at the Last Query, it basically tried to get the WHERE Clause from the Block B4 instead of the Block B1 in which case there was a problem Querying that block and thus getting Error 40505. What's interesting that Block B1 and B4 don't have a relationship set up either.
The where clause that is being created is actually coming from the where clause of Block B4 which has been set up in the Property Sheet value.
Am not putting any code here for now but if that helps, I can put some code in there. I don't have any buttons on the form and neither are there any explicit SET_BLOCK_PROPERTY to set the Where Clause dynamically for any of these blocks.
Any help is appreciated.