Little problem with master-detail

Little problem with master-detail

Postby 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)?
xchaotic
 
Posts: 9
Joined: Wed 19 Oct 2005 20:49

Postby 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).
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby 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.
xchaotic
 
Posts: 9
Joined: Wed 19 Oct 2005 20:49

Postby Ikar » Thu 24 Nov 2005 12:52

Just set MasterFields and DetailFields to DEPTNO
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby xchaotic » Wed 30 Nov 2005 07:11

That's exactly what I did.
xchaotic
 
Posts: 9
Joined: Wed 19 Oct 2005 20:49

Postby 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 ?
swierzbicki
 
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Postby 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
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56


Return to MySQL Data Access Components