Master-Detail relation and "DefaultValues=true"
Posted: Mon 17 Aug 2009 09:29
Hi,
I found a problem with Master-Detail relations and "DefaultValues=true" on the Detail Dataset.
If I call "Append" on the Detail Dataset (TOraTable), the foreign key field (which targets the master record) becomes the "DefaultExpression" ('0') and not the Primary Key Value of the master table.
The old BDE Application ignores the DefaultExpression if working with Master-Detail relations. The new detail record foreign key field becomes the corresponding primary key value of the master record.
Of course, I can assign the PK value manually, but then I have to change the code at thousand places. Same for "dropping the default value for foreign key columns".
Regards
sk
I found a problem with Master-Detail relations and "DefaultValues=true" on the Detail Dataset.
If I call "Append" on the Detail Dataset (TOraTable), the foreign key field (which targets the master record) becomes the "DefaultExpression" ('0') and not the Primary Key Value of the master table.
The old BDE Application ignores the DefaultExpression if working with Master-Detail relations. The new detail record foreign key field becomes the corresponding primary key value of the master record.
Of course, I can assign the PK value manually, but then I have to change the code at thousand places. Same for "dropping the default value for foreign key columns".
Regards
sk