Little problem with master-detail

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
xchaotic
Posts: 9
Joined: Wed 19 Oct 2005 20:49

Little problem with master-detail

Post by xchaotic » Mon 21 Nov 2005 17:35

Hi, I've been fiddling with myDAC for the past few weeks, almost everything works (except http://crlab.com/forums/viewtopic.php?p=7506).
And once again using myDAC MasterDetail .net sample works fine when displaying the relevant detail data, when I add a record to a detail table, it binds it to the record id=1 not id=currently selected master record.
The code in detailQuery "WHERE Id = :Id" is not "where detail.Id = master.Id", I understand that's because you set that using MasterSource etc properties.
So tell me what am doing wrong that it doesn't INSERT proper Id 9Id always =1)?

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 22 Nov 2005 07:51

Thank you for information.
It's known problem and we've already fixed it.
Please download the last MyDAC version (4.00.1.6).

xchaotic
Posts: 9
Joined: Wed 19 Oct 2005 20:49

Post by xchaotic » Tue 22 Nov 2005 19:05

I installed the latest version, when I recompiled my project I still got the same bug.
Eventually I got it working by setting the M-D relationship in corresponding fields.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 24 Nov 2005 12:52

Just set MasterFields and DetailFields to DEPTNO

xchaotic
Posts: 9
Joined: Wed 19 Oct 2005 20:49

Post by xchaotic » Wed 30 Nov 2005 07:11

That's exactly what I did.

swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Post by swierzbicki » Wed 30 Nov 2005 09:15

Have you sended a small demo project ?
I guess that will be easier to track donw the problem ?

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 01 Dec 2005 13:15

I checked MasterDetail demo once more and did not find the error. Please send us (mydac*crlab*com) a complete small sample to demonstrate it and include script to create and fill table.

Also supply us following information

- Exact version of Delphi, C++ Builder or Kylix
- Exact version of MyDAC. You can see it in About sheet of TMyConnection Editor
- Exact version of MySQL server and MySQL client.
You can see it in Info sheet of TMyConnection Editor

Post Reply