No corresponding master record found

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
pleitch
Posts: 5
Joined: Fri 29 Sep 2006 05:23

No corresponding master record found

Post by pleitch » Sat 11 Nov 2006 23:13

MySQL server version: 5.0.24a-community-nt
MySQL client version: Direct

using MyDAC 4.40.0.20 for Delphi 5

I use a TMyQuery / TDataSetProvider / TClientDataSet

In v4.00.1.6, the detail rec references a field in the master rec and updates the master rec when the field in the detail changes.

In v4.40.0.20, when a detail rec is added, it now populates the detail rec with the master value and then loops when I attempt to update the master rec (post) with a new value from the detail rec.

TMyQuerys:
select * from master_table
select * from detail_table (with MasterSource pointing to master_table and MasterFields referencing the common field)

I suspect this problem to be related to my using TClientDataSet(s) and Midas.

thxs

ps: thanks for fixing "Lost connection to MySQL server during query"

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 13 Nov 2006 14:54

> In v4.00.1.6, the detail rec references a field in the master rec and
> updates the master rec when the field in the detail changes.
What change do you mean?

Please describe the situation more detailed or send us a complete small sample to demonstrate it, including script to create and fill tables.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 14 Nov 2006 13:35

Thank you for sample. Try to link master and detail data sets via parameters. Please see the "Working with master/detail relationships" article in the MyDAC help for details.

pleitch
Posts: 5
Joined: Fri 29 Sep 2006 05:23

Post by pleitch » Tue 14 Nov 2006 18:57

I tried with parameters and read the help. No luck. It seems I can't change the field in the detail. If I change it in the master, it propagates to the detail but the change isn't saved.

I liked the behaviour of the earlier version so will go back to it.

thxs

Post Reply