Page 1 of 1

Bug Report : cacheupdate + localmasterdetail + AutoPrepare +

Posted: Sat 16 May 2009 07:38
by Justmade
Bug Report : cacheupdate + localmasterdetail + AutoPrepare + Presistant Detail Field.

When using the above combination, when setting Detail.Active to True, it will report Field not found.

To re-create this problem, you can use the MyDAC included example database. I used DEPT table as Master and EMP table as detail using DEPTNO to link them.

1. Create a project
2. put 1 TMyConnection and setup to link to the demo database
3. create 2 TMyQuery and 1 TMyDataSource and set them to select * from DEPT and EMP tables. The DataSource point to the DEPT query.
4. In EMP query, select DataSource as Master Sources and DEPTNO as MasterFields and DetailFields.
5. Set Cache Update to true, Options.AutoPrepare to True, Options.LocalMasterDetail to true.
6. put a button and put code to onclick to set both Query to true.

Run the program, which work fine.

Now, stop the program and
7. In field editor of EMP table, choice to add all field.

Run it again, and it report "Field DEPTNO not found."

Actually if you set them active in design time you can also get that message.

I am using Delphi 7 with MyDAC 5.80.0.46. I can send a copy of the above project if needed.

Posted: Mon 18 May 2009 11:08
by Plash
We have fixed this problem. The fix will be included in the next build of MyDAC.