Page 1 of 1

Little problem with master-detail

Posted: Mon 21 Nov 2005 17:35
by xchaotic
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)?

Posted: Tue 22 Nov 2005 07:51
by Ikar
Thank you for information.
It's known problem and we've already fixed it.
Please download the last MyDAC version (4.00.1.6).

Posted: Tue 22 Nov 2005 19:05
by xchaotic
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.

Posted: Thu 24 Nov 2005 12:52
by Ikar
Just set MasterFields and DetailFields to DEPTNO

Posted: Wed 30 Nov 2005 07:11
by xchaotic
That's exactly what I did.

Posted: Wed 30 Nov 2005 09:15
by swierzbicki
Have you sended a small demo project ?
I guess that will be easier to track donw the problem ?

Posted: Thu 01 Dec 2005 13:15
by Ikar
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