Bug Report : cacheupdate + localmasterdetail + AutoPrepare +

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Justmade
Posts: 108
Joined: Sat 16 Aug 2008 03:51

Bug Report : cacheupdate + localmasterdetail + AutoPrepare +

Post by Justmade » Sat 16 May 2009 07:38

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.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 18 May 2009 11:08

We have fixed this problem. The fix will be included in the next build of MyDAC.

Post Reply