Page 1 of 1

Master/Detail events are not firing properly

Posted: Fri 16 Feb 2007 07:10
by Japhar
Hi,

We are having SDAC source code of 3.80.0.32.

I observed that Master/Detail events are not firing properly.
So i just modified code in dbaccess.pm file.

Can you please confirm that the code which i have written will effect any where. I'm just closing and opening a dataset to fire the events of detail query component.


In a procedure "TDADetailDataLink.ActiveChanged" added below code

if FDataSet.Active and
not (csDestroying in FDataSet.ComponentState) and Active then
begin

// Added code Close/Open, so events of Detail Query will get fire
if ((FDataSet nil) and (FDataSet.Active) and (FDataSet.State dsSetKey)) then
begin
FDataSet.Close;
FDataSet.Open;
end;
//End Adding.


FDataSet.RefreshParams;

Please confirm......

Posted: Fri 16 Feb 2007 10:19
by Antaeus
Please describe the reason of suggested fix more detailed. What events do you mean?

Posted: Fri 16 Feb 2007 11:04
by Japhar
1. I have a x query with x datasource in x data module

x query: select c1, c2,c3 from xyz

2. I have y query in y data module

y query: select a1,a2,a3 from abc where a4=:c1
c1 is the input parameter which it gets from x query.
For that i set the Master data source of y query with x.

4. For y query i have written an After open event in y data module.

5. When i try to open x query then it needs to fire afteropen event of y query in y datamodule. which is not happing.

For that i have modified code in DBAccess.pas file and it works....

Is this information is OK...or more information is required. I found the above scenario in my project. I have not created a new project to check the above scenario....

Posted: Fri 16 Feb 2007 14:11
by Antaeus
Thank you for your suggestion. We will think about supporting such events in the next MyDAC version.
By the way, implementing your suggestion would not be optimal because it leads to a double server roundtrip (both on Open and on RefreshParams).

Posted: Fri 16 Feb 2007 14:35
by Japhar
Thanks for your response.

But can you please let me know how much time should we need to wait? approximatly....

Can you please let me know the change which i made will leads to any unexpected results in someother scenarios???

Because i have tested few screens in my project after my change and the functionality works as expected else i have look for work-around.
:cry:

Please let me know your comments on this....

Posted: Fri 16 Feb 2007 15:37
by Antaeus
> But can you please let me know how much time should we need to wait? approximatly....
We are considering including this fix in one of builds of MyDAC 5.

> Can you please let me know the change which i made will leads to any unexpected results in someother scenarios???
There should not be any problems using this code with SDAC. But this code will probably not work with the other Core Lab Data Access Components (MyDAC, ODAC, IBDAC). The DBAccess unit is a common unit for the DACs.

Posted: Sat 17 Feb 2007 10:45
by Japhar
I really thanks for your response...