|
|
|
Forum Member
      
Group: Forum Members
Last Login: Yesterday @ 08:46:25
Posts: 36,
Visits: 636
|
|
Hi all,
I'm writing a small ASP.NET application. As I understand the EcoSpaceManager throws an exception during page unload if there are dirty objects.
One option to avoid this exception is to call EcoSpace.UpdateDatabase() after each change to ECO objects. But it will result in too many calls to UpdateDatabase().
What's the preferred practice to minimize the number of calls to UpdateDatabase() ?
Thanks,
--
Oleg Zhukov
--
Oleg Zhukov
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 2011-07-14 17:05:00
Posts: 290,
Visits: 2 617
|
|
OZh (2010-06-24) Hi all,
I'm writing a small ASP.NET application. As I understand the EcoSpaceManager throws an exception during page unload if there are dirty objects.
One option to avoid this exception is to call EcoSpace.UpdateDatabase() after each change to ECO objects. But it will result in too many calls to UpdateDatabase().
What's the preferred practice to minimize the number of calls to UpdateDatabase() ?
Thanks,
--
Oleg Zhukov
Only update the DB after you change something. Also, updating the DB when there are no dirty objects will do nothing.
====
Pete
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: Yesterday @ 08:46:25
Posts: 36,
Visits: 636
|
|
Why not updating DB automatically before unloading the page?
I mean why I should remember to call UpdateDatabase() myself if it can be hooked to some page lifecycle event?
--
Oleg Zhukov
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 2011-06-28 15:42:26
Posts: 487,
Visits: 1 277
|
|
Maybe the user has changed their mind and he DOESN'T want to save the changes just because he is leaving the page?
/mtiede
Environment:
Windows 7 Ultimate 64 bit
Delphi 6
Rad Studio 2010 Enterprise with Prism 2011
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 2011-07-14 17:05:00
Posts: 290,
Visits: 2 617
|
|
OZh (2010-06-26) Why not updating DB automatically before unloading the page?
I mean why I should remember to call UpdateDatabase() myself if it can be hooked to some page lifecycle event?
So when the user clicks "Cancel" you want the page unload event to update the DB? 
Save at the point the user has completed a single logical operation.
====
Pete
|
|
|
|