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"...
A probable bug with TMyquery.localmasterdetail
-
AndreyZ
-
AndreyZ
-
AndreyZ
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:- by calling the Prepare method before calling Execute. Here is a code example: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.
- by using the Open method instead of Execute. Here is a code example:
Code: Select all
MasterQuery.Open;
DetailQuery.Open;Code: Select all
MasterQuery.Open;
DetailQuery.Prepare;
DetailQuery.Execute;