Board index » delphi » How to design master detail IBDataset ?

How to design master detail IBDataset ?

Hi,

I tried setting Datasource property of a TIBDataSet to the master
IBDataSet's data source.
The detail grids of course didn't show the foreign key used to link between
the two but when posting the record in the detail table, it says "Foreign
Key" needs a value.

Normally in BDE the foreign key is filled automatically.

What should I do ?

Thanks in advance

 

Re:How to design master detail IBDataset ?


Quote
jimmy wrote:

> Hi,

> I tried setting Datasource property of a TIBDataSet to the master
> IBDataSet's data source.
> The detail grids of course didn't show the foreign key used to link between
> the two but when posting the record in the detail table, it says "Foreign
> Key" needs a value.

> Normally in BDE the foreign key is filled automatically.

> What should I do ?

> Thanks in advance

In the OnNewRecord event, copy the key value from the datalink to the detail
field.

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
Anyone who cannot cope with mathematics is not fully human.
At best he is a tolerable subhuman who has learned to wear
shoes, bathe and not make messes in the house.   (Heinlein)

Other Threads