A probable bug with TMyquery.localmasterdetail

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kaffeburk
Posts: 214
Joined: Mon 29 Jan 2007 08:03

A probable bug with TMyquery.localmasterdetail

Post by kaffeburk » Sun 25 Mar 2012 22:04

When a TMyquery have "localmasterdetail := True;"
and the field are added to the tMyquery with the field editor an exception is trowed, and reverse; if no fields are added to the field editor no exception is created. Sometimes there is convenient to have to fields added so the actual fields can be used not only the "fieldByName"...

AndreyZ

Post by AndreyZ » Mon 26 Mar 2012 14:42

Hello,

I cannot reproduce the problem. Please try using the latest MyDAC 7.1.5 and check if the problem persists.

kaffeburk
Posts: 214
Joined: Mon 29 Jan 2007 08:03

Post by kaffeburk » Tue 27 Mar 2012 05:53

AndreyZ wrote:Hello,

I cannot reproduce the problem. Please try using the latest MyDAC 7.1.5 and check if the problem persists.
I have to renew first - using 7.1.4

AndreyZ

Post by AndreyZ » Wed 28 Mar 2012 11:33

I cannot reproduce this problem using MyDAC 7.1.4 either. Please try creating a small sample to demonstrate the problem and send it to andreyz*devart*com .

kaffeburk
Posts: 214
Joined: Mon 29 Jan 2007 08:03

Post by kaffeburk » Wed 28 Mar 2012 14:35

AndreyZ wrote:I cannot reproduce this problem using MyDAC 7.1.4 either. Please try creating a small sample to demonstrate the problem and send it to andreyz*devart*com .
I still have it with 7.1.5 // Sending a mail

AndreyZ

Post by AndreyZ » Thu 29 Mar 2012 13:48

Thank you for the information. We have fixed the problem with LocalMasterDetail. This fix will be included in the next MyDAC build. You can avoid this problem in two ways:
- by using the Open method instead of Execute. Here is a code example:

Code: Select all

MasterQuery.Open;
DetailQuery.Open;
- by calling the Prepare method before calling Execute. Here is a code example:

Code: Select all

MasterQuery.Open;
DetailQuery.Prepare;
DetailQuery.Execute;
The second problem in your project occurs because you created an infinite loop in the CheckBox1Click method. I've sent you your sample with all needed corrections.

Post Reply