Automatic Master/Detail configuration problem

manas

Member²
Automatic Master/Detail configuration was working fine with the previous versions. After updating to 3.4.5 I have to manually build master detail settings (i.e. DOA do not automatically configure them).

All the following requirements are met:

* The SQL property of the master and detail are set correctly
* The Session of either the master or detail is connected
* One foreign key constraint exists from the detail to the master

regards

------------------

[This message has been edited by manas (edited 26 March 2002).]
 
This works fine when I try it (with 3.4.6) with the DeptEmp demo project. Can you try this?

------------------
Marco Kalter
Allround Automations
 
YES.

I remove master dataset and then recreate it but automatic configuration did not work again.

I wonder Whether other users do not have such a problem.

I use DOA since version 3.3.2 and I know all of the features of this component package.
up to version 3.4.x auto configuration was working properly.

yusuf

best regard.

------------------
 
in oracledata.pas
line=3053

if (ComponentState - [csAncestor] = [csDesigning]) and
((FMaster = nil) or (FMaster.ComponentState - [csAncestor] = [csDesigning])) then
GetMasterDetailFields;

The above if clause never executes the "then" condition.

However, when we add

if (ComponentState=[csDesigning,csFreeNotification]) and (FMaster nil)
then GetMasterDetailFields;

all the problem is being solved.

Is this OK? Shall I make these modifications?

Best Regards,

[This message has been edited by manas (edited 29 March 2002).]
 
I assume you are using Delphi 6? I have been able to reproduce the problem with it. The ComponentState includes csFreeNotification, which does not seem correct. The correct Delphi 6 fix would be:
Code:
if (ComponentState - [csAncestor, csFreeNotification] = [csDesigning]) and
   ((FMaster = nil) or (FMaster.ComponentState - [csAncestor, csFreeNotification] = [csDesigning])) then
  GetMasterDetailFields;
We'll look into this.

------------------
Marco Kalter
Allround Automations

[This message has been edited by mkalter (edited 04 April 2002).]
 
Back
Top