Too frequent calls to UpdateDatabase() in ECO ASP.NET app
CapableObjects Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Too frequent calls to UpdateDatabase() in ECO... Expand / Collapse
Author
Message
Posted 2010-06-24 06:51:50
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum 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
Post #5328
Posted 2010-06-24 09:20:45
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme 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
Post #5329
Posted 2010-06-26 12:26:40
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum 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
Post #5332
Posted 2010-06-26 14:51:43


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme 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
Post #5333
Posted 2010-06-26 15:40:51
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme 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
Post #5334
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: HansKarlsen, Jonas Hogstrom, PeterMorris

Permissions Expand / Collapse

All times are GMT +1:00, Time now is 12:14

Powered By InstantForum.NET v4.1.4 © 2012
Execution: 0,141. 6 queries. Compression Disabled.