Board index » delphi » Cachedupdates with master/detail tables doesn't work
Edward Baarda
![]() Delphi Developer |
Sat, 20 Jul 2002 03:00:00 GMT
|
Edward Baarda
![]() Delphi Developer |
Sat, 20 Jul 2002 03:00:00 GMT
Cachedupdates with master/detail tables doesn't work
I'm using IB express compnents to access the interbase
tables. I have Master-Detail tables and with the property cachedupdates=true. When I set a Starttransaction (IBTransaction) and before committing the edits, inserts etc. only the master table is updated and not the detail-tables. When I look at the property UpdatesPending only the master is set to TRUE and the details are not, even though there were changes on the details. Is there a workaround or a solution to this problem, if you want to see what Edward |
Team
![]() Delphi Developer |
Sat, 20 Jul 2002 03:00:00 GMT
Re:Cachedupdates with master/detail tables doesn't workDo you have the detail conencted to the master through the Datasource property? If so break that connection before applying the updates. When you apply updates to the Master the cursor is 'moved' to the first record to apply. This happens even if the current record is the first (BDE works the saem way). When the master cursor moves the detail dataset will close and reopen on the new master. When the detail closes the cache is flushed for the detail losing your updates. Breaking the tie before applying the updates will solve this since the master cursor move will no longer move the detail. This is not a bug but a WAD. QuoteEdward Baarda wrote: Jeff Overcash (TeamB) On waves of silver I dreamed of gold (Please do not email 'Till I lost the peace that dreaming gives me directly unless I dreamed of the moment of my own death asked. Thank You) That no one ever dreams and lives (Marillion) |
Lou Feli
![]() Delphi Developer |
Thu, 25 Jul 2002 03:00:00 GMT
Re:Cachedupdates with master/detail tables doesn't workPMJI Jeff, So, if there are pending updates for both the detail and master table, the detail I was hoping to find a simple sample program somewhere, but no luck. - Lou Quote"Jeff Overcash (TeamB)" wrote: Luis R. Feliz Information Systems Manager KRM Risk Management and Insurance Services http://www.krmrisk.com ph:559-277-4800 ext 461 fx:559-277-4950 lfe...@krmrisk.com (remove the word nospam) |
Team
![]() Delphi Developer |
Thu, 25 Jul 2002 03:00:00 GMT
Re:Cachedupdates with master/detail tables doesn't workQuoteLou Feliz wrote: master will need posting before the detail if there is a foriegn constraint on the detail table. Otherwise when you try to post thedetail you will get an exception that the constraint is being violated. Quote> I am in the middle of converting a with cached updates when it somes time to apply the updates is to just break the datasource link between the two, apply the updates and then re establish the link once commited. Quote> I was hoping to find a simple sample program somewhere, but no luck. Jeff Overcash (TeamB) On waves of silver I dreamed of gold (Please do not email 'Till I lost the peace that dreaming gives me directly unless I dreamed of the moment of my own death asked. Thank You) That no one ever dreams and lives (Marillion) |
1. Master/Detail with TQuery.Datasource, doesn't work for me
2. Master Detail doesn't work after D4 patch
3. Simple Master - Detail Doesn't work
4. Delphi 3.2 CS/Interbase /Master-Detail doesn't work
5. Master/Detail doesn't work since IBX 5.04
6. CachedUpdate & Master, Detail table
7. FindKey doesn't works with CachedUpdates
8. Confirmed D2 bug: cached updates don't work for master/detail - here's why
9. Master/detail relationship doesn't show records
10. Locate in Master/Detail tables causes Detail table to fail