Creating Master/Detail relationship - When creating tables at run time using strongly typed datasets - and no data in Master table gives error in detail table ‘Field not found’. If I use LoadSchema it works but this is clearly a bug as I shouldn’t need to explicity call LoadSchema at specific times when hooking up tables.
When should/shouldn’t we call LoadSchema as in correct usage?
If I cascade the Master/Detail - Client -> Order -> Order Items … this is a perfect example. Create a New client - no data will exist in either Order or Order Items.
Using DA with Delphi 2010 Front end with C# Backend.
When you open separate tables created in runtime - DA populates field defs for them. But if there are some relaionships between tables (master-detail, lookup fields) - then DA first tries to adjust relationship and only after that opens dependent table (it is made for reducing network traffic) and includes schema in response. So you should call LoadSchema in such cases.
By the other hand, you can open tables independently. After this you can create and apply m/d relationship. In this case whole tables will be loaded but call of LoadSchema isn’t required.