Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 10 of 15 total |
CachedUpdates with m/d |
Sun, Jul 23 2006 5:28 AM | Permanent Link |
"Sorin" | from an old message i figure that when activating beginCachedUpdates
the m/d relation is disabled so on the detail table on the afterOpen event i have declared : BeginCachedUpdates; MasterSource := mainDatasource; MasterFields :='mainId'; but still the m/d relation isn't enabled thanks sorin |
Sun, Jul 23 2006 6:34 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Sorin,
<< from an old message i figure that when activating beginCachedUpdates the m/d relation is disabled so on the detail table on the afterOpen event i have declared : BeginCachedUpdates; MasterSource := mainDatasource; MasterFields :='mainId'; but still the m/d relation isn't enabled >> Cached updates are static and do not change until you call ApplyCachedUpdates or CancelCachedUpdates, regardless of whether you have a master-detail relationship, a range, or a filter defined on the table. In all cases, you're simply setting a range or filtering the cached updates dataset, not the actual live table. -- Tim Young Elevate Software www.elevatesoft.com |
Sun, Jul 23 2006 10:50 AM | Permanent Link |
"Sorin" | Thanks but I don't figure out what to do
Basically this is a simple module that I try to convert from D2006 BDE application It has a main table and a related detail table witch i open on cache mode. The user can append one record on the main table and several records on the detail and post them with transaction and applyupdates or open both for editing. I don't use any range or filters on the bde version. What are the differences on the dbisam version? sorin > > Cached updates are static and do not change until you call > ApplyCachedUpdates or CancelCachedUpdates, regardless of whether you have > a master-detail relationship, a range, or a filter defined on the table. > In all cases, you're simply setting a range or filtering the cached > updates dataset, not the actual live table. > > -- > Tim Young > Elevate Software > www.elevatesoft.com > > |
Sun, Jul 23 2006 10:30 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Sorin,
<< It has a main table and a related detail table witch i open on cache mode. The user can append one record on the main table and several records on the detail and post them with transaction and applyupdates or open both for editing. I don't use any range or filters on the bde version.What are the differences on the dbisam version? >> With the BDE, cached updates are table-wide, meaning that you can change ranges (M/D), filters, etc. while the cached updates are in effect. With DBISAM, cached updates are simply an in-memory copy of the current dataset as of the time the BeginCachedUpdates method is called. Also, when cached updates are in effect, all existing ranges or filters are removed and any subsequent ranges and filters only apply to the cached dataset, not the actual underlying dataset. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Jul 24 2006 7:15 AM | Permanent Link |
"Sorin" | > With the BDE, cached updates are table-wide, meaning that you can change
> ranges (M/D), filters, etc. while the cached updates are in effect. With > DBISAM, cached updates are simply an in-memory copy of the current dataset > as of the time the BeginCachedUpdates method is called. Also, when cached > updates are in effect, all existing ranges or filters are removed and any > subsequent ranges and filters only apply to the cached dataset, not the > actual underlying dataset. Can you direct me to a demo of m/d with cached? |
Mon, Jul 24 2006 8:18 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Sorin,
<< Can you direct me to a demo of m/d with cached? >> There's one here: http://www.elevatesoft.com/scripts/newsgrp.dll?action=openmsg&group=5&msg=52902&page=1#msg52902 -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Jul 25 2006 11:26 AM | Permanent Link |
"Sorin" | > http://www.elevatesoft.com/scripts/newsgrp.dll?action=openmsg&group=5&msg=52902&page=1#msg52902
Thanks Tim I saw the demo but I can't implement it on my application. On my app. I need to create an Invoice saved on 2 tables. One table include the main invoice fields (No. date, total...) and the second table the invoice items and sum per item. The 2 tables have a m/d relation. All I need are 2 options One is to append one invoice and several items and then save them all together. Second is to set an existed invoice and her details on edit mode to allow required modification and again saving the 2 tables. On my BDE app I achieve it by simply putting the tables on cache mode Can I do the same with dbisam or do i need a different approach? Sorin |
Wed, Jul 26 2006 12:25 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Sorin,
<< I saw the demo but I can't implement it on my application. >> It isn't intended to be put into your application. It is intended to demonstrate how to use cached updates in a master-detail link. << On my app. I need to create an Invoice saved on 2 tables. One table include the main invoice fields (No. date, total...) and the second table the invoice items and sum per item. The 2 tables have a m/d relation. All I need are 2 options One is to append one invoice and several items and then save them all together. Second is to set an existed invoice and her details on edit mode to allow required modification and again saving the 2 tables. On my BDE app I achieve it by simply putting the tables on cache mode Can I do the same with dbisam or do i need a different approach? >> As demonstrated in the example that I linked to, you only need to put the detail side of the master-detail link into cached updates mode. The master record is always buffered when in insert or edit mode, thus you don't need to use cached updates with it. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Jul 26 2006 6:54 AM | Permanent Link |
"Sorin" | > As demonstrated in the example that I linked to, you only need to put the
> detail side of the master-detail link into cached updates mode. The > master record is always buffered when in insert or edit mode, thus you > don't need to use cached updates with it. Thanks again absolutely, I only call the BeginCacheUpdate to the detail table and i encounters 2 problems. The first invoice is saved ok The second one raise a key violation error on the primary key (the second table has an autoinc field as primary key besides the invoiceNo field i use for the m/d relation) The second problem is when I open and old invoice on edit mode I can not see the details from the second table. I try to reestablished the m/d relation after the begincacheupdate, as on your example but it doesn't help. Sorin |
Thu, Jul 27 2006 10:44 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Sorin,
<< absolutely, I only call the BeginCacheUpdate to the detail table and i encounters 2 problems. The first invoice is saved ok The second one raise a key violation error on the primary key (the second table has an autoinc field as primary key besides the invoiceNo field >> Are you calling ApplyCachedUpdates at any time ? You have to call either ApplyCachedUpdates or CancelCachedUpdates to stop the cached updates when moving between the master records without posting (CancelCachedUpdates), or when posting an invoice (ApplyCachedUpdates). The demo application that I linked to shows how this is done. -- Tim Young Elevate Software www.elevatesoft.com |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Sunday, May 19, 2024 at 08:46 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |